+ Dev On Thu, Apr 7, 2016 at 8:58 AM, Lochana Ranaweera <[email protected]> wrote:
> Hi Gimantha, > > Thank you for the explanation. :) > With the underscore prefix in place, I was able to search for webapp names > containing special characters. > >> >> - time: [1422247320 TO 1482554520] AND webappName: "a" >> >> >> - time: [1422247320 TO 1482554520] AND webappName: "A" >> >> >> - time: [1422247320 TO 1482554520] AND webappName: "%" >> >> >> - time: [1422247320 TO 1482554520] AND webappName: "*" >> >> >> - time: [1422247320 TO 1482554520] AND webappName: "$" >> >> >> So all of the above queries will give zero records. > > > However, instead of giving a result of zero records, ALL the records in > the database were listed as a result of the said queries. > > > On Wed, Apr 6, 2016 at 6:20 PM, Gimantha Bandara <[email protected]> > wrote: > >> [1] https://en.wikipedia.org/wiki/Stop_words >> >> On Wed, Apr 6, 2016 at 6:19 PM, Gimantha Bandara <[email protected]> >> wrote: >> >>> Hi, >>> >>> That is the expected behavior. In Lucene analysis process, the words >>> like "will", "be", "as", "a" [1] or any special characters will be removed. >>> >>> - time: [1422247320 TO 1482554520] AND webappName: "a" >>> - time: [1422247320 TO 1482554520] AND webappName: "A" >>> - time: [1422247320 TO 1482554520] AND webappName: "%" >>> - time: [1422247320 TO 1482554520] AND webappName: "*" >>> - time: [1422247320 TO 1482554520] AND webappName: "$" >>> >>> >>> So all of the above queries will give zero records. You can prefix the >>> underscore to any STRING field if you want to search for those special >>> characters and stop words. That underscore prefixed field is indexed >>> without removing the stop words. >>> >>> [1] >>> >>> On Wed, Apr 6, 2016 at 4:36 PM, Lochana Ranaweera <[email protected]> >>> wrote: >>> >>>> Hi Supun, >>>> >>>> Yes, I can use that as a workaround. >>>> >>>> Thanks. >>>> >>>> On Wed, Apr 6, 2016 at 3:34 PM, Supun Sethunga <[email protected]> wrote: >>>> >>>>> Yes, noticed the same. Lucene query results the entire row set for >>>>> particular cases (for certain single characters like: "a", "A" etc) as you >>>>> have mentioned. Guess you can use *_webappName *as a workaround? >>>>> >>>>> @Gimantha: Is this an expected behavior? mind having a look? :) >>>>> >>>>> Thanks, >>>>> Supun >>>>> >>>>> On Wed, Apr 6, 2016 at 3:02 PM, Lochana Ranaweera <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi Supun, >>>>>> >>>>>> It works with the query *time: [1422247320 TO 1482554520] AND >>>>>> _webappName: "/" *in this example. Please note that there are no >>>>>> webappNames with part of them matching ' / ', but still the search >>>>>> results >>>>>> in entire set of records for the query *time: [1422247320 TO >>>>>> 1482554520] AND webappName: "/" *(without the underscore-prefix). >>>>>> >>>>>> Thank you. >>>>>> >>>>>> On Wed, Apr 6, 2016 at 2:29 PM, Supun Sethunga <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hi Lochana, >>>>>>> >>>>>>> Can you try with "time: [1422247320 TO 1482554520] AND >>>>>>> *_webappName*:<any_value>" (note the underscore). "webappName" with >>>>>>> underscore-prefix means to match the entire word, while just the " >>>>>>> webappName"says to match any part of the word. >>>>>>> >>>>>>> Regards, >>>>>>> Supun >>>>>>> >>>>>>> On Wed, Apr 6, 2016 at 1:58 PM, Lochana Ranaweera <[email protected] >>>>>>> > wrote: >>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> I'm using the data explorer of the WSO2 DAS to search for records >>>>>>>> by a query. The table is as follows: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> In this table the column 'webappName' is of type STRING and it is >>>>>>>> declared as a FACET field in order to search for webapps by the name. >>>>>>>> >>>>>>>> A list of records corresponding to the 'examples' webapp can be >>>>>>>> inquired using the given query; *time: [1422247320 TO 1482554520] >>>>>>>> AND webappName: "examples"*. However, the result for the query, *time: >>>>>>>> [1422247320 TO 1482554520] AND webappName: "/"*, is the entire set >>>>>>>> of records in the table, but not the records corresponding to webapp ' >>>>>>>> / ' >>>>>>>> in the given time range. >>>>>>>> >>>>>>>> The following queries too resulted in the entire set of records in >>>>>>>> the table: >>>>>>>> >>>>>>>> - time: [1422247320 TO 1482554520] AND webappName: "a" >>>>>>>> - time: [1422247320 TO 1482554520] AND webappName: "A" >>>>>>>> - time: [1422247320 TO 1482554520] AND webappName: "%" >>>>>>>> - time: [1422247320 TO 1482554520] AND webappName: "*" >>>>>>>> - time: [1422247320 TO 1482554520] AND webappName: "$" >>>>>>>> >>>>>>>> All the records in the given table satisfy the time range in the >>>>>>>> queries. Except in the query, *time: [1422247320 TO 1482554520] >>>>>>>> AND webappName: "examples"*,it seems the condition joined by the >>>>>>>> 'AND' is ignored when webapp name takes the form " / " ," a ", " >>>>>>>> A ", " $ " , " * " or " %" . >>>>>>>> >>>>>>>> Appreciate your feedback on this matter. >>>>>>>> >>>>>>>> Regards, >>>>>>>> -- >>>>>>>> Lochana Ranaweera >>>>>>>> Intern Software Engineer >>>>>>>> WSO2 Inc: http://wso2.com >>>>>>>> Blog: https://lochanaranaweera.wordpress.com/ >>>>>>>> Mobile: +94716487055 <http://tel%2B716487055> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Dev mailing list >>>>>>>> [email protected] >>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Supun Sethunga* >>>>>>> Software Engineer >>>>>>> WSO2, Inc. >>>>>>> http://wso2.com/ >>>>>>> lean | enterprise | middleware >>>>>>> Mobile : +94 716546324 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Lochana Ranaweera >>>>>> Intern Software Engineer >>>>>> WSO2 Inc: http://wso2.com >>>>>> Blog: https://lochanaranaweera.wordpress.com/ >>>>>> Mobile: +94716487055 <http://tel%2B716487055> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Supun Sethunga* >>>>> Software Engineer >>>>> WSO2, Inc. >>>>> http://wso2.com/ >>>>> lean | enterprise | middleware >>>>> Mobile : +94 716546324 >>>>> >>>> >>>> >>>> >>>> -- >>>> Lochana Ranaweera >>>> Intern Software Engineer >>>> WSO2 Inc: http://wso2.com >>>> Blog: https://lochanaranaweera.wordpress.com/ >>>> Mobile: +94716487055 <http://tel%2B716487055> >>>> >>>> >>> >>> >>> -- >>> Gimantha Bandara >>> Software Engineer >>> WSO2. Inc : http://wso2.com >>> Mobile : +94714961919 >>> >> >> >> >> -- >> Gimantha Bandara >> Software Engineer >> WSO2. Inc : http://wso2.com >> Mobile : +94714961919 >> > > > > -- > Lochana Ranaweera > Intern Software Engineer > WSO2 Inc: http://wso2.com > Blog: https://lochanaranaweera.wordpress.com/ > Mobile: +94716487055 <http://tel%2B716487055> > > -- Lochana Ranaweera Intern Software Engineer WSO2 Inc: http://wso2.com Blog: https://lochanaranaweera.wordpress.com/ Mobile: +94716487055 <http://tel%2B716487055>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
