: Yes on both counts. Although it takes a bit of practice, if you add
: &debug=query to the query you'll see a section of the
: response showing you exactly what the resulting query is after
: all the rules are applied.

In addition, something else about edismax that you might find useful (but 
isn't immediatley obvious) ...

: > The documentation at 
: > 
https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser
 
: > says that eDisMax "supports the full Lucene query parser syntax".
: > Does this mean that a query string "color:brown^2 and mazda" is legal 
: > with eDisMax too?  Notice that I am specifying the color field in the 
: > query (lucene parser syntax). If the answer is yes, does this mean that 
: > "brown" is only filtered against the color field and mazda will be 
: > filtered against both the color field and the brand field?

...with the "uf" param, and per field "qf" overrides, you can define what 
it means when a query string contains a fieldname like "color" -- even if 
your index doesn't have a field named "color".

with something like this...

   defType=edismax
   uf=color title brand
   qf=main_color trim_color brand^5 title^10 text
   f.color.qf=main_color^3 trim_color^2
   q=color:brown mazda

..."brown" would only be searched against the main_color and 
trim_color fields (with the specified boosts) while "mazda" would be 
searched against all the fields listed in the "qf".  

As long as you use the "uf" param, it limits the "field names" (or field 
"aliases" if you use the f.foo.qf syntax) a user can specify in the "q" 
param -- so if you had all the params mentioned above, but the query was...

  q=color:brown security_level:private

...then even if you have a "security_level" field in your index, that part 
of the query string will be treated as a plain old string value and not a 
field name -- so all your qf fields will be searched for the string 
"security_level:private"



-Hoss
http://www.lucidworks.com/

Reply via email to