Hi, I've been trying to figure out how to return the (number) of  matching 
words in a regex term lookup with no luck.


Basically i have a large text document indexed, next when i do a regex term 
lookup like the following:


http://localhost:8983/solr/core1/terms?terms.fl=content&terms.regex=.*term.*&terms.limit=10000


That returns all the words (up to 1000) that are either an exact match, start, 
end or contain the word 'term' successfully, see below:


<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">6</int>
</lst>
<lst name="terms">
<lst name="content">
<int name="buttermilk">1</int>
<int name="determine">1</int>
<int name="determined">1</int>
<int name="determines">1</int>
<int name="exterminated">1</int>
<int name="indeterminable">1</int>
<int name="indeterminate">1</int>
<int name="intermediate">1</int>
<int name="intermitting">1</int>
<int name="intermixed">1</int>
<int name="term">1</int>
<int name="terminated">1</int>
<int name="terminating">1</int>
<int name="terminus">1</int>
<int name="terms">1</int>
<int name="watermelon">1</int>
</lst>
</lst>
</response>


What i need is the syntax to produce e.g. how many times the word 'min' or 
'term' exists in that document either as term by itself or part of another term?


At the moment it only tells me that it occurs in '1' document which can be 
useful later on.


I've been looking at the cwiki page: 
https://cwiki.apache.org/confluence/display/solr/The+Terms+Component


and other articles on the net with no luck.


Can you please help.


Many thanks.

Reply via email to