You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Paul Forsyth <pf...@ez.no> on 2009/10/19 12:23:11 UTC
Terms truncation
Hi,
I'm using the terms component for an autosuggest feature and it works
well but i've hit an issue with truncation:
Take the following query:
http://localhost:8983/solr/terms?terms.fl=meta_name_t&terms.prefix=switch
This is the response:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
</lst>
<lst name="terms">
<lst name="meta_name_t">
<int name="switchov">35</int>
<int name="switch">7</int>
</lst>
</lst>
</response>
In this case the word 'switchov' is returned where i expected
'switchover'. The word 'switchov' doesn't exist by itself
I'm puzzled with the truncation. The handles are all standard for 1.4.
Are other factors affecting the response? I couldn't see an
appropriate option for the query to adjust the length of the returned
string...
Thanks in advance,
Paul Forsyth
Re: Terms truncation
Posted by Paul Forsyth <pf...@ez.no>.
Thanks Grant,
I'm still a bit of a newbie with Solr :)
I was able to add a new non-stemming field along with a copyfield, and
that seems to have done the trick :)
Until i tried this i didnt quite realise what copyfields did...
Thanks again,
Paul
On 19 Oct 2009, at 11:23, Paul Forsyth wrote:
> Hi,
>
> I'm using the terms component for an autosuggest feature and it
> works well but i've hit an issue with truncation:
>
> Take the following query:
>
> http://localhost:8983/solr/terms?terms.fl=meta_name_t&terms.prefix=switch
>
> This is the response:
>
> <response>
>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">1</int>
> </lst>
>
> <lst name="terms">
>
> <lst name="meta_name_t">
> <int name="switchov">35</int>
> <int name="switch">7</int>
> </lst>
> </lst>
> </response>
>
> In this case the word 'switchov' is returned where i expected
> 'switchover'. The word 'switchov' doesn't exist by itself
>
> I'm puzzled with the truncation. The handles are all standard for 1.4.
>
> Are other factors affecting the response? I couldn't see an
> appropriate option for the query to adjust the length of the
> returned string...
>
> Thanks in advance,
>
> Paul Forsyth
>
>
Re: Terms truncation
Posted by Grant Ingersoll <gs...@apache.org>.
On Oct 19, 2009, at 6:23 AM, Paul Forsyth wrote:
> Hi,
>
> I'm using the terms component for an autosuggest feature and it
> works well but i've hit an issue with truncation:
>
> Take the following query:
>
> http://localhost:8983/solr/terms?terms.fl=meta_name_t&terms.prefix=switch
>
> This is the response:
>
> <response>
>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">1</int>
> </lst>
>
> <lst name="terms">
>
> <lst name="meta_name_t">
> <int name="switchov">35</int>
> <int name="switch">7</int>
> </lst>
> </lst>
> </response>
>
> In this case the word 'switchov' is returned where i expected
> 'switchover'. The word 'switchov' doesn't exist by itself
I'm guessing you are asking for terms on a field that is stemmed.
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
using Solr/Lucene:
http://www.lucidimagination.com/search