开发者

How can I retrieve a list of terms from an Examine index?

开发者 https://www.devze.com 2023-03-28 21:12 出处:网络
I have implemented Examine in an Umbraco project and have created an index of my site\'s content. What I now need is a list of terms stored in that index for any given field.

I have implemented Examine in an Umbraco project and have created an index of my site's content. What I now need is a list of terms stored in that index for any given field.

This list of terms will be the basis for an autocomplete search field of a UI form.

How can I retrieve this list of terms based upon a开发者_如何学Python specific field, e.g. nodeName?

Please note, I do not want to search against the nodeName field. I wish to read/retrieve the terms in the index associated with the field.


You may try this:

reader.terms(new Term("nodeName", ""));


It seems this is not possible but since the Examine library is based upon the Lucene library, it is a matter of "rolling your own" and just opening and interrogating an IndexReader instance using the reader.Terms() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消