lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: document search returning no results
Date Tue, 08 May 2012 20:40:47 GMT
Even with “multi-term aware” (in 3.6 and trunk) analysis, you can’t have a single query
term that analyzes (tokenizes) into multiple index terms AND has wildcards. In other words,
if you want to use wildcard, the query term has to analyze (tokenize) into a single term.

Three strategies:

1. Split the query into multiple terms that are ANDed together and then use wildcards on the
specific terms (words or tokens.)

2. Consider whether the field should be tokenized at all. Maybe it should be string or keyword
and always wildcard to reference values.

3. Have two fields, one which is tokenized and lets you query by individual words embedded
in the field values, and a second field which is a string or keyword and is not tokenized
but use wildcards on the full field value, with a copyField to populate one field from the
stored value of the other.

-- Jack Krupansky

From: Ryan Langton 
Sent: Tuesday, May 08, 2012 12:49 PM
Subject: document search returning no results

I have a search that is coming up empty despite a document existing with the search text.
 Is the / an illegal character?


Here’s the field when I’m creating the document:


[5] = {indexed,tokenized<AssignedAreasWithId:3-Genetics,404-AnnalsofFamilyMedicine-July/August2009,60-Obesity/WeightManagement>}


Here’s my lucene search query:






Ryan Langton


Digital Evolution Group

913.951.3175 x155 (office)

913.498.9985 (fax)


View raw message