Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12436 (closed)

Opened 10 years ago

Closed 10 years ago

BUG: Search for AND and OR

Reported by: pwalczysko Owned by: dlindner
Priority: major Milestone: 5.0.3
Component: Client Version: 5.0.2
Keywords: n.a. Cc: ux@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by pwalczysko)

A query like

nd2 weird AND attachment

will be interpreted atm by our clients as

weird AND attachment

This is because Lucene is interpreting the query as such

(nd2 SHOULD, weird MUST, attachment MUST)

which marginalises the SHOULD term. The expected result with

nd2 SHOULD, (weird MUST attachment MUST) SHOULD

interpretation is passed to Lucene using syntax

nd2 OR (weird AND attachment)

This is not possible now in the clients, because the clients strip the brackets away (probably).
dlindner suggests the solution:

for a query like
nd2 weird AND attachment
the clients will add the brackets for Lucence and pass
nd2 (weird AND attachment)

which would result in the expected result for the user.

Change History (5)

comment:1 Changed 10 years ago by pwalczysko

  • Description modified (diff)

comment:2 Changed 10 years ago by jamoore

  • Cc khgillen removed
  • Owner set to dlindner

Dominik, once you're existing search PRs are through, would you like to give this a try? It will mean Java & Python will diverge briefly, but we can update the tests to either have someone else modify web/python, or to have an explanation ready for Will on his return.

comment:3 Changed 10 years ago by dlindner

Done in Insight ( AND terms now are encapsulated within brackets).
Insight and Web are already diverge at the moment (wrt AND across multiple fields). Will said he'll take my Java LuceneQueryBuilder? class and Testcase and convert it to Python once he's back, so Insight and Web will construct the same query.

comment:4 Changed 10 years ago by jamoore

NB: if we decide we have time and would rather solve this with your Java code for both clients, then we could try detecting a prefix to byFullText:

   >>LuceneQueryBuilder<<: *.svs

comment:5 Changed 10 years ago by dlindner

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66981 sec.)

We're Hiring!