lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: [PhraseQuery] Can "jakarta apache"~10 be searched by offset ?
Date Mon, 13 May 2013 12:48:02 GMT
You'll have to be more explicit about the actual data and what didn't work.

Try developing a simple, self-contained unit test with some simple strings 
as input that demonstrates the case that you say doesn't work.

I mean, regular expressions and field analysis can both be quite tricky - 
even a tiny typo can break everything.

To be clear, my suggested approach to using regular expressions works only 
on un-tokenized input, so there won't be any positions or even offsets.

Other than that, you're on your own until you develop that small, 
self-contained unit test.

Or, you can file a Jira for a new Lucene Query for phrase and or span 
queries that measures distance by offsets rather than positions.

-- Jack Krupansky

-----Original Message----- 
From: wgggfiy
Sent: Monday, May 13, 2013 3:47 AM
Subject: Re: [PhraseQuery] Can "jakarta apache"~10 be searched by offset ?

Jack, according to you, How can I implemt this requirement ?Could you give 
a clue ? thank you very much.The regex query seemed not worked ? I got the
field such as        FieldType fieldType = new FieldType();
FieldInfo.IndexOptions indexOptions =
fieldType.setIndexOptions(indexOptions);        fieldType.setIndexed(true);
fieldType.setTokenized(true);        fieldType.setStored(true);
fieldType.freeze();        return new Field(name, value, fieldType);

View this message in context:
Sent from the Lucene - Java Users mailing list archive at 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message