How can I retrieve a list of terms from an Examine index?
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.
精彩评论