Hello Sergii and Florent,
Thank you for your comments.
I closed pr #94 and created a new pr
#97 with one commit.
Thanks,
Rima
From: che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Tuesday 02 June 2015 17:52
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
Hello Rima
Could you plz take a look on Florent comment on github.
On Tue, Jun 2, 2015 at 5:48 PM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Hi Sergii,
Following my previous pull request #77,
I added tests for Lucene Searcher
#94 that test:
1. contains query
2. query as a regular _expression_
3. query that contains special characters
Thanks,
Rima
With current implementation I achieve “contains” functionality by passing text as a regex in the
following format /.*uer.*/ even without setting AllowLeadingWildcard flag.
So right now I don’t have any use case that requires custom QueryParser
From:
che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Wednesday 27 May 2015 16:06
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
What about 1 idea is to allow you to set up custom QueryParser by extending Lucene earcher . QueryParser will be constucted new for each search request.
In that custom QueryParser you can set setAllowLeadingWildcard depending on you busines logic. Will that work for you?
On Wed, May 27, 2015 at 4:00 PM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Great, thanks
J
From:
che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Wednesday 27 May 2015 13:41
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
On Wed, May 27, 2015 at 12:34 PM, Sergii Kabashniuk <skabashnyuk@xxxxxxxxxxx> wrote:
On Wed, May 27, 2015 at 11:43 AM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Hi,
I updated my pull request.
Just one question: after it is merged to master, which next official release of Che will contain
this fix ?
Thanks a lot,
Rima
From:
che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Wednesday 27 May 2015 09:37
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
Can you confirm that you updated your PR?
On Wed, May 27, 2015 at 8:34 AM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Hello Sergii,
Sorry for the delay in my response. We were out of office due to group integration day
J
In general, I think it is a good idea to enable each vendor to use a custom QueryParser.
However, in our specific use case for “contains” query it might be an overhead.
Since you already upgraded Lucene to version 5.0 it is possible to perform a search with regular
expressions.
So I can achieve “contains” functionality by passing text as a regex in the following format /.*uer.*/
even without setting AllowLeadingWildcard flag.
I’ll update my pull request to contain only change #2 (without setting AllowLeadingWildcard flag
).
Thanks a lot for your support.
Best Regards,
Rima Sirich
From:
che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Monday 25 May 2015 15:39
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
For 1 idea is to allow you to set up custom QueryParser by extending Lucene earcher . QueryParser will be constucted new for each search request.
In that custom QueryParser you can set setAllowLeadingWildcard depending on you busines logic. Will that work for you?
On Mon, May 25, 2015 at 3:34 PM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Hello Sergii,
First of all, thank you very much for the prompt response
J
I am glad to hear that we agree on 2.
Regarding 1, I am not sure I understand the proposed solution. Could you, please, elaborate on it
a little bit more ?
As you can see in QueryParser documentation
http://lucene.apache.org/core/5_0_0/queryparser/org/apache/lucene/queryparser/classic/QueryParserBase.html#setAllowLeadingWildcard(boolean)
allowLeadingWildcard
property is configurable and by default is set to false because of possible performance penalty on big indexes. So, may be the decision to enable it or not should be at client and not at server as I proposed. I think I should add another query parameter
allowLeadingWildcard and only if client had explicitly set its’ value to true then enable it.
I should replace this code
if (text.startsWith("*") || text.startsWith("?")) {
qParser.setAllowLeadingWildcard(true);
}
With this one
qParser.setAllowLeadingWildcard(allowLeadingWildcard);
What do you think ?
Thanks & Best Regards,
Rima Sirich
From:
che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergii Kabashniuk
Sent: Monday 25 May 2015 14:38
To: che developer discussions
Subject: Re: [che-dev] Lucene search enhancements
Hello
On Mon, May 25, 2015 at 1:10 PM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:
Hello,
I would like to enhance Lucene search capabilities therefore I created a pull request
(
https://github.com/codenvy/che-core/pull/77 ) with following changes:
1. queryParser.setAllowLeadingWildcard(true) enables performing contains query ( like *uer* )
I'm not sure about that. I think different vendors may want to have custom behaviour of QueryParser. Wdyt maybe we should allow to extend it in the same way like we do for Analyzer
or Directory or IndexWriter
2. SimpleAnalyzer uses LetterTokenizer with LowerCaseFilter, that means that it creates tokens by broking a text by non-letter characters, therefore in current implementation it
is not possible to search for the text containing special characters. Using WhitespaceTokenizer solves this issue as it creates tokens by broking a text by whitespace.
I tend to agree with you. If discussion of 1 will be long may be you should decouple this tasks.
I would very appreciate if you could have a look on this pull request and consider merging it to master.
Thanks & Best Regards,
Rima Sirich
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
|