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 Traut <tr...@gmail.com> on 2007/11/06 16:51:51 UTC

query syntax

Hi

         I have in index document with field "name" and its value is
"somename123"
         Why I can't find anything with query
             name:somename123*
         but there are results on query
             name:"somename123*"
         As far as I understand first query is just fine. why Solr
didn't understand it?

         I'm using StandardRequestHandler

thank you

-- 
Best regards,
Traut

Re: query syntax

Posted by Traut <tr...@gmail.com>.
So you think my problem is caused by different index/query data
analysis? i'll check it. thank you

On Nov 6, 2007 6:02 PM, Yonik Seeley <yo...@apache.org> wrote:
> On 11/6/07, Traut <tr...@gmail.com> wrote:
> >          I have in index document with field "name" and its value is
> > "somename123"
> >          Why I can't find anything with query
> >              name:somename123*
>
> This is a prefix query.  No analysis is done on the prefix, so it may
> not match analysis that was done when the document was indexed.
>
> For example, if you use WordDelimiterFilter, this may be indexed as
> "somename 123"
>
> >          but there are results on query
> >              name:"somename123*"
>
> This is not a prefix query.  The * will most likely be removed by the
> analyzer, leaving you effectively with a query of name:somename123
>
> -Yonik
>



-- 
Best regards,
Traut

Re: query syntax

Posted by Yonik Seeley <yo...@apache.org>.
On 11/6/07, Traut <tr...@gmail.com> wrote:
>          I have in index document with field "name" and its value is
> "somename123"
>          Why I can't find anything with query
>              name:somename123*

This is a prefix query.  No analysis is done on the prefix, so it may
not match analysis that was done when the document was indexed.

For example, if you use WordDelimiterFilter, this may be indexed as
"somename 123"

>          but there are results on query
>              name:"somename123*"

This is not a prefix query.  The * will most likely be removed by the
analyzer, leaving you effectively with a query of name:somename123

-Yonik