Re: Wildcard in a text field

2013-02-08 Thread Steve Rowe
Hi Nicolas, For trailing '*' only: On the query side, you can use a front-side EdgeNGramTokenFilter with a large max gram size, followed by a PatternReplaceFilter with pattern "(.*)" and replacement "$1*". Steve On Feb 8, 2013, at 10:14 AM, Nicolas Roduit wrote: > For instance, I have a lis

Re: Wildcard in a text field

2013-02-08 Thread Jack Krupansky
From: Nicolas Roduit Sent: Friday, February 08, 2013 10:14 AM To: java-user@lucene.apache.org Subject: Re: Re: Wildcard in a text field For instance, I have a list of tags related to a text. Each text with its list of tags are put in a document and indexed by Lucene. If we consider that a tag

Re: Re: Wildcard in a text field

2013-02-08 Thread Ian Lea
So you want a query for "buddhist" to match indexed term "budd*"? Or "bud* or "bu*" or "b*"? Assuming you are using an analyzer that preserves the *, given "buddhist" you could search for exactly "b*", "bu*" etc. I'll let you think about ? rather than *. -- Ian. On Fri, Feb 8, 2013 at 3:14 P

Re: Re: Wildcard in a text field

2013-02-08 Thread Nicolas Roduit
For instance, I have a list of tags related to a text. Each text with its list of tags are put in a document and indexed by Lucene. If we consider that a tag is "buddh*" and I would like to make a query (e.g. "buddha" or "buddhism" or "buddhist") and find the document that contain "buddh*". T

Re: Wildcard in a text field

2013-02-08 Thread Jack Krupansky
That description is too vague. Could you provide a couple of examples of index text and queries and what you expect those queries to match. If you simply want to query for "*" and "?" in "string" fields, escape them with a backslash. But if you want to escape them in "text" fields, be sure to