Re: Facets with OR clause

2013-04-24 Thread Kai Becker
Try fq=(groups:group1 OR locations:location1)

Am 24.04.2013 um 12:39 schrieb vsl:

> Hi,
> 
> my request contains following term:
> 
> The are 3 facets:
> groups, locations, categories.
> 
> 
> 
> When I select some items then I see such syntax in my request.
> fq=groups:group1&fq=locations:location1
> 
> Is it possible to add OR clause between facets items in query?
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Facets-with-OR-clause-tp4058553.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: Querying only for "+" character causes org.apache.lucene.queryParser.ParseException

2013-04-23 Thread Kai Becker
Hi,

you need to escape that char in search terms.
Special chars are + - ! ( ) { } [ ] ^ " ~ * ? : \ / at the moment.

The %2B is just the url encoding, but it will still be a + for Solr, so just 
put a \ in front of the chars I mentioned.

Cheers,
Kai

Am 23.04.2013 um 15:41 schrieb Jorge Luis Betancourt Gonzalez:

> Hi!
> 
> Currently I'm working on a basica search engine for, the main problem is that 
> during some tests a problem was detected, in the application if a user search 
> for the "+" or "-" term only or the "+" string it causes an exception in 
> my application, the problem is caused for an 
> org.apache.lucene.queryParser.ParseException in solr. I get the same response 
> if, from the solr admin interface, I search for the + term. For what I've 
> seen the "+" character gets encoded into "%2B" which cause the exception. Is 
> there any way of escaping this character so they behave like any other 
> character? or at least get no response for this cases? 
> 
> I'm using solr 3.6.2, deployed in tomcat7.
> 
> Greetings! 
> http://www.uci.cu



more results when adding more criterias

2013-04-18 Thread Kai Becker
Hi,
I have a field which has data like this:

 
   
Where  can have from 1 to 10 letters strings and  can have up 
to 4 digits.

It is defined like this:


  


  


When the user enters foo, i search for foo directly or something that starts 
with "foo ".
I don't want to find "fool" or "foop" or anything like this.
I also allow users to enter terms that they don't want to find.

So a query for  "foo NOT foo 123" is converted to this:

parsedquery_toString: "+(+(myField:foo myField:foo *) +(-myField:foo 123 
-myField:foo 123 * +*:*))",

My problem is that this finds more entries then just foo, which converts to 
this:
parsedquery_toString: "+(myField:foo myField:foo *)",

I have read a bit about the internal solr logic, using MUST, SHOULD and 
MUST_NOT, but still don't understand.

When I look at parsedquery_toString: "+(+(myField:foo myField:foo *) 
+(-myField:foo 123 -myField:foo 123 * +*:*))",
then I see two criteria A and B and both MUST be satisfied.
Criteria A is the same as parsedquery_toString: "+(myField:foo myField:foo *)", 
so the number of results MUST be identical here.
Since the final results must match both A and B, the number must be equal or 
lower than just A, right?

Where do I think wrong?

Thanks,
Kai