You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ian Vink <ia...@gmail.com> on 2009/09/12 21:25:49 UTC

field with single quote being split

My index has a field <religion> with the source of the document. In luke I
can see that religion has baha'i or islam or Tao etc....

The problem is that when I construct a query in luke with "religion:baha'i"
luke thinks it's 2 terms "baha" and "i"

Is there a way to construct a query to make it search <religion> with the
single term "baha'i" ?

I've tried escaping the single quote but still luke splits the query into 2
terms.

Thanks,
ian

Re: field with single quote being split

Posted by AHMET ARSLAN <io...@yahoo.com>.
> I'm using Snowball as I have a dozen languages.

You are using SnowballAnalyzer at both index and query time, right?
SnowballAnalyzer uses StandardTokenizer which keeps baha'i as one token.

The apostrophe in your query, can it be \u2019 ? Something similar to ' but different character.



      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: field with single quote being split

Posted by Ian Vink <ia...@gmail.com>.
I'm using Snowball as I have a dozen languages.

ian



On Sat, Sep 12, 2009 at 4:56 PM, AHMET ARSLAN <io...@yahoo.com> wrote:

> > The problem is that when I construct a query in luke with
> > "religion:baha'i"
> > luke thinks it's 2 terms "baha" and "i"
>
> Which analyzer is used in query parsing? LetterTokenizer?
>
> > Is there a way to construct a query to make it search
> > <religion> with the
> > single term "baha'i" ?
>
> Using different analyzer (StandardAnalyzer for example) in queryparsing can
> do that.
>
> hope this helps.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: field with single quote being split

Posted by AHMET ARSLAN <io...@yahoo.com>.
> The problem is that when I construct a query in luke with
> "religion:baha'i"
> luke thinks it's 2 terms "baha" and "i"

Which analyzer is used in query parsing? LetterTokenizer?

> Is there a way to construct a query to make it search
> <religion> with the
> single term "baha'i" ?

Using different analyzer (StandardAnalyzer for example) in queryparsing can do that.

hope this helps.



      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org