> AndMaybe(a, b)* Lucene does not really have booleans. Instead, it has plus, minus, and neither. Plus means "this term has to be in", minus means "this term cannot be in" and neither means "maybe". This means "A has to be in the document, and the document scores higher if B is in it": "+A B". What you describe is "A AND MAYBE B". "Plus A space B" does this. MAYBE is not in the AND/OR/NOT syntax.
> *Otherwise(a, b)* I'm not sure that "if-then" can be done. ----- Original Message ----- | From: "Ramzi Alqrainy" <ramzi.alqra...@gmail.com> | To: solr-user@lucene.apache.org | Sent: Monday, September 3, 2012 7:36:06 AM | Subject: Missing Features - AndMaybe and Otherwise | | Hi, | | I would like to help me for certain problem. I have encountered a | problem in | task I think if you implement the below functions/conditions, you | will help | us for many issues. | | *AndMaybe(a, b)* | Binary query takes results from the first query. If and only if the | same | document also appears in the results from the second query, the score | from | the second query will be added to the score from the first query. | | *Otherwise(a, b)* | A binary query that only matches the second clause if the first | clause | doesn’t match any documents. | | | My problem is : | | I have documents and I do group by on certain field (e.g. Field1). I | want | to get documents with Field2 is [3 or 9 or 12] if exist, otherwise | get any | document. please see the below example. | | | D1 : ----------- | Field1 : 1 - | Field2 : 3 ---------> D1 (group by on field1 and | field2 is | 3) | - | D2: ----------- | Field1 : 1 | Field2 : 4 | | | D3: ----------- | Field1 : 2 - | Field2 : 5 --------------> any document D3 or D4 | - | D4: ----------- | Field1 : 2 | Field2 : 7 | | I want to get the results like below | D1(Mandatory) | (D3 OR D4) | | | | -- | View this message in context: | http://lucene.472066.n3.nabble.com/Missing-Features-AndMaybe-and-Otherwise-tp4005059.html | Sent from the Solr - User mailing list archive at Nabble.com. |