Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-1.0-rc3
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 15:32 UTC
Updated:
6 Nov 2009 at 01:50 UTC
I have a couple books on Lucene and Solr, but none of the syntax described in these books seem to work through Drupal/ApacheSolr. Should it be identical? I can't even get the OR operator to work as expected. Perhaps I have to enable/disable something(s) to get the "real" Lucene query interpreter? I feel like my queries are getting parsed by a dumb middleman.
Also, is there a guide to query syntax through ApacheSolr?
Comments
Comment #1
pwolanin commentedBy default we use the dismax handler which strips all the lucene syntax out.
http://wiki.apache.org/solr/DisMaxRequestHandler
Comment #2
pwolanin commentedsee also: http://wiki.apache.org/solr/SolrQuerySyntax and http://lucene.apache.org/java/2_9_0/queryparsersyntax.html
With Dismax you can use + and - for required or not-allowed terms
Comment #3
Todd Young commentedThanks, that really helps. Is there an alternate handler for search demi-geeks? Or a module to enable crazy queries?
Comment #4
pwolanin commentedYou can specify an alternate path for a different handler, or specify the &qt=standard parameter
Look at the code for making mlt queries.
Comment #5
Todd Young commentedI was reading a number of posts expressing concern at the domino effects related to changing the handler. Is this a quagmire of troubleshooting, or is it just a preference? Could you point me in the direction of where I'd analyze the code to change this?
I sniffed around a few files and it looked quagmirey.
I bet it's not just a matter of changing this setting in the solrconfig xml:
Comment #6
pwolanin commentedI you change it for the module as a whole, much will break - e.g. the fact that we search across multiple fields. The dismax handler is designed to take more-or-less unfiltered user input, so you might want to build an additional search form to pass queries to the standard handler.
Comment #7
Todd Young commentedI want to go to there. I am trying to put together an application that appeals to both "just find it" commercial users and also very nuts-and-bolts-oriented search wiz's that need (and are very used to) advanced syntaxes, stacked queries, etc...
I will attempt to build a second search form that uses the standard handler. If there are specific files I should examine I'd appreciate knowing which ones. I hope I can get good enough at this to contribute my work.