lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From satya swaroop <satya.yada...@gmail.com>
Subject Re: spell suggest response
Date Mon, 17 Jan 2011 09:43:16 GMT
Hi Grijesh,
            i added both the termscomponent and spellcheck component to the
terms requesthandler, when i send a query as
http://localhost:8080/solr/terms?terms.fl=text&terms.prefix=java&&rows=7&omitHeader=true&spellcheck=true&spellcheck.q=java&spellcheck.count=20

the result i get is
<response>
-
<lst name="terms">
-
<lst name="text">
<int name="java">6</int>
<int name="javabas">6</int>
<int name="javas">6</int>
<int name="javascript">6</int>
<int name="javac">6</int>
<int name="javax">6</int>
</lst>
</lst>
-
<lst name="spellcheck">
<lst name="suggestions"/>
</lst>
</response>



when i send this
http://localhost:8080/solr/terms?terms.fl=text&terms.prefix=jawa&&rows=5&omitHeader=true&spellcheck=true&spellcheck.q=jawa&spellcheck.count=20
i get the result as

<response>
-
<lst name="terms">
<lst name="text"/>
</lst>
-
<lst name="spellcheck">
-
<lst name="suggestions">
-
<lst name="jawa">
int name="numFound">20</int>
<int name="startOffset">0</int>
<int name="endOffset">4</int>
-
<arr name="suggestion">
<str>java</str>
<str>away</str>
<str>jav</str>
<str>jar</str>
<str>ara</str>
<str>apa</str>
<str>ana</str>
<str>ajax</str>


Now i need to know how to make ordering of the terms as in the 1st query the
result obtained is inorder and i want only javax, javac,javascript but not
javas,javabas.... how can it be done??

Regards,
satya

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message