using (WordprocessingDocument doc = WordprocessingDocument.Open(newpath, true))
{
var body = doc.MainDocumentPart.Document.Body;
var anchor = body.Descendants<DocumentFormat.OpenXml.Drawing.Wordprocessing.Anchor>();
foreach (var anc in anchor)
{
var docProperties = anc.Descendants<DocumentFormat.OpenXml.Drawing.Wordprocessing.DocProperties>().Where(tp => tp.Title != null);
foreach (DocumentFormat.OpenXml.Drawing.Wordprocessing.DocProperties docProp in docProperties)
{
if (docProp.Title.Value == "circle")
{
var shapes = anc.Descendants<DocumentFormat.OpenXml.Office2010.Word.DrawingShape.WordprocessingShape>();
foreach (var sh in shapes)
{
foreach (var sp in sh.Elements<DocumentFormat.OpenXml.Office2010.Word.DrawingShape.ShapeProperties>())
{
foreach (var fill in sp.Elements<DocumentFormat.OpenXml.Drawing.SolidFill>())
{
// deleting SchemeColor if already set up in the solidfill
if (fill.SchemeColor != null) { fill.SchemeColor.Remove(); }
// m.QLA.CircleColorHex is simply a string representing the color in 6 char Hex - this does not use the # before, so a value is like "FFFFFF"
DocumentFormat.OpenXml.Drawing.RgbColorModelHex rgb = new DocumentFormat.OpenXml.Drawing.RgbColorModelHex() { Val = m.QLA.CircleColorHex };
fill.Append(rgb);
}
}
}
}
}
}
}
将返回所有索引。
我的搜索索引就像
zscan id_name 0 match *t* count 100
我尝试了以下命令
zadd id_name 0 a:b
zadd id_name 0 t1:test
zadd id_name 0 a:test
zadd id_name 0 t2:b
以上命令仅返回zscan id_name 0 match t*:t* count 10
,但我也希望返回t1:test
。
是否有任何搜索命令达到上述要求?