Storing phrases in index

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Storing phrases in index

palexv
Hello all.
I have a question to advanced in lucene.
I have a set of phrases which I need to store in index.
Is there is a way of storing phrases as terms in index?

How is the best way of writing such index? Should this field be tokenized?

What is the best way of searching phrases by mask in such index? Should I use BooleanQuery, WildCartQuery or SpanQuery?
How is the best way to escape from maxClauses exception when searching like a*?
Reply | Threaded
Open this post in threaded view
|

Re: Storing phrases in index

Mathieu Lecarme
palexv a écrit :
> Hello all.
> I have a question to advanced in lucene.
> I have a set of phrases which I need to store in index.
> Is there is a way of storing phrases as terms in index?
>
> How is the best way of writing such index? Should this field be tokenized?
>  
not tokenized
> What is the best way of searching phrases by mask in such index? Should I
> use BooleanQuery, WildCartQuery or SpanQuery?
il you search complete phrase, just use Term, if you search part of
phrase, use ShingleFilter.

>  
> How is the best way to escape from maxClauses exception when searching like
> a*?
>  
indexing indexed term.

M.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Storing phrases in index

palexv
Thanks!
Can you help me to get ShingleFilter class. It is absent in version 2.3.1. How can I get it?

Mathieu Lecarme wrote
palexv a écrit :
> Hello all.
> I have a question to advanced in lucene.
> I have a set of phrases which I need to store in index.
> Is there is a way of storing phrases as terms in index?
>
> How is the best way of writing such index? Should this field be tokenized?
>  
not tokenized
> What is the best way of searching phrases by mask in such index? Should I
> use BooleanQuery, WildCartQuery or SpanQuery?
il you search complete phrase, just use Term, if you search part of
phrase, use ShingleFilter.

>  
> How is the best way to escape from maxClauses exception when searching like
> a*?
>  
indexing indexed term.

M.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Reply | Threaded
Open this post in threaded view
|

Re: Storing phrases in index

Mathieu Lecarme
palexv a écrit :
> Thanks!
> Can you help me to get ShingleFilter class. It is absent in version 2.3.1.
> How can I get it?
>  
It's in the SVN version. You can backport it, are building your own,
with a Stack.

M.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Storing phrases in index

palexv
Please, can you give me a simple example of how to use ShingleFilter?
Thanks a lot!

Mathieu Lecarme wrote
palexv a écrit :
> Thanks!
> Can you help me to get ShingleFilter class. It is absent in version 2.3.1.
> How can I get it?
>  
It's in the SVN version. You can backport it, are building your own,
with a Stack.

M.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Reply | Threaded
Open this post in threaded view
|

Re: Storing phrases in index

hossman
In reply to this post by palexv

: To: [hidden email]
: Subject: Storing phrases in index

http://people.apache.org/~hossman/#java-dev

Please Use "java-user@lucene" Not "java-dev@lucene"

Your question is better suited for the java-user@lucene mailing list ...
not the java-dev@lucene list.  java-dev is for discussing development of
the internals of the Lucene Java library ... it is *not* the appropriate
place to ask questions about how to use the Lucene Java library when
developing your own applications.  Please resend your message to
the java-user mailing list, where you are likely to get more/better
responses since that list also has a larger number of subscribers.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]