Query syntax Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query syntax Question

shai deljo
Hi,
I have 2 questions about the syntax of a query for which i didn't find
a clear answer in the documents (when i try using Lucene syntax it
fails for some reason).

I have the following Query:
q=field1:tag1 tag2^0.5 OR field2:tag1
tag2^0.5&version=2.2&start=0&rows=170&indent=on&fl=*,score

And i want to do :
1. Return back ONLY documents that contain both tag1 AND tag2 in
field1. when i try using Lucene syntax (+tag1 or +(tag1)) i get an
exception from Lucene.
2. Boost field 1 (something like q=field1^3:tag1 tag2^0.5 OR..).

Any advice on what's the correct syntax for this?
Help is much appreciated !
S
Reply | Threaded
Open this post in threaded view
|

Re: Query syntax Question

Chris Hostetter-3
:
: I have the following Query:
: q=field1:tag1 tag2^0.5 OR field2:tag1
: tag2^0.5&version=2.2&start=0&rows=170&indent=on&fl=*,score
:
: And i want to do :
: 1. Return back ONLY documents that contain both tag1 AND tag2 in
: field1. when i try using Lucene syntax (+tag1 or +(tag1)) i get an
: exception from Lucene.

can you show us exactly what you are querying on, and what the exception
is? (ie: what is your URL?)

: 2. Boost field 1 (something like q=field1^3:tag1 tag2^0.5 OR..).

boosts apply to entire queries, so if you want to boost a query on
field1:tag1 you put hte boost after that: field1:tag1^3




-Hoss