Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Alessandro Benedetti
Yes what I meant is that you actually can use your analyser when the query is not in the quotes. When in the quotes you can directly build a term Query out of it. Now of course it is not so simple scenario, do you think quoted query and not quoted query parts are 2 different set of queries, which

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Diego Socaceti
sorry little code refactoring typo: curTokenProcessed should be userCriteriaProcessed ... public static final String EXACT_SEARCH_FORMAT = "\"%s\""; public static final String MULTIPLE_CHARACTER_WILDCARD = "*"; ... if (isExactCriteriaString(userCriteria)) { String userCriteriaEscaped = St

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Diego Socaceti
Hi Alessandro, sorry, that i forgot the important part. Here it is: ... public static final String EXACT_SEARCH_FORMAT = "\"%s\""; public static final String MULTIPLE_CHARACTER_WILDCARD = "*"; ... if (isExactCriteriaString(userCriteria)) { String userCriteriaEscaped = String.format(EXACT

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Alessandro Benedetti
I read briefly, correct me if I am wrong, but that is to parse the content within the quotes " . But we are still at a String level. I want to see how you build the phraseQuery :) Taking a look to the code the PhraseQuery allow you to add as many terms you want. What you need to do, it's to not to

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Diego Socaceti
Hi Alessandro, i guess code says more than worlds :) ... public static final String EXACT_SEARCH_FORMAT = "\"%s\""; public static final String MULTIPLE_CHARACTER_WILDCARD = "*"; ... if (isExactCriteriaString(userCriteria)) { String userCriteriaEscaped = String.format(EXACT_SEARCH_FORMAT,

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Alessandro Benedetti
As a start Diego, how do you currently parse the user query to build the Lucene queries ? Cheers 2015-07-22 8:35 GMT+01:00 Diego Socaceti : > Hi Alessandro, > > yes, i want the user to be able to surround the query with "" to run the > phrase query with a NOT tokenized phrase. > > What do i have

Re: Analyzer for supporting hyphenated words

2015-07-22 Thread Diego Socaceti
Hi Alessandro, yes, i want the user to be able to surround the query with "" to run the phrase query with a NOT tokenized phrase. What do i have to do? Thanks and Kind regards On Tue, Jul 21, 2015 at 2:47 PM, Alessandro Benedetti < benedetti.ale...@gmail.com> wrote: > Hey Jack, reading the doc