wildcard query question

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

wildcard query question

Alessandro Senserini
I have indexed a field called courseTitle of 'text' type (as in the
schema.xml but without the stemming factory) that contains

 

COBOL: Data Structure

 

Searching with a wildcard query like

 

courseTitle:cobol\:*  AND courseTitle:data* AND courseTitle:structure*

 

(the colon character ":" is escaped) the record is not found.  If the
search is

 

courseTitle:cobol*  AND courseTitle:data* AND courseTitle:structure*

 

the record is found.  I was wondering how the colon character affects
the search, and if there is another way to write a wildcard query.

 

Thanks.

 


.
The information contained in this e-mail message is intended only for the personal
and confidential use of the recipient(s) named above. This message is privileged
and confidential. If the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you are hereby notified
that you have received this document in error and that any review, dissemination,
distribution, or copying of this message is strictly prohibited.
Reply | Threaded
Open this post in threaded view
|

Re: wildcard query question

hossman


: the record is found.  I was wondering how the colon character affects
: the search, and if there is another way to write a wildcard query.

most likely the issue is that your analyzer is striping out the colon
character, hence your normal phrase search works (because the colon is
striped out both when indexing and querying) but your wildcards don't,
because the wildcard query string is not analyzed...

http://wiki.apache.org/lucene-java/LuceneFAQ#head-133cf44dd3dff3680c96c1316a663e881eeac35a





-Hoss