jeffcoughlin / farcrysolrpro

FarCry Solr Pro plugin Supports: Solr 3.5, FarCry 7.0+, 6.2+, 6.1.4+, 6.0.19+
http://jeffcoughlin.github.com/farcrysolrpro
Other
10 stars 8 forks source link

Feature: Ability to exclude specific Solr fields from the qf parameter #49

Open boomfish opened 12 years ago

boomfish commented 12 years ago

The solrProSearch form sets the qf parameter to all available Solr fields for the searched content types that are compatible with the search operator. This causes Solr to search user queries against all those fields, however this may result in unintended matches:

There should be some way (such as a checkbox in the Solr Pro Content Type admin form) to mark custom and default properties on a type so that it is not automatically included in the qf parameter for a search.

Suggested behavior:

Looking at the code, I believe the setting could be implemented within solrProIndexedProperty.lFieldTypes by changing it from a list of name:type doubles to a list of name:type:qf triples.

seancoyne commented 12 years ago

We intended that you would override the default search form for issues like this, but I think the idea has merit. I'll talk it over with Jeff and we'll consider it. It could certainly be useful.

boomfish commented 12 years ago

I wouldn't mind overriding the default search form for this kind of thing. however in its current form it is very monolithic: overriding features requires a lot of copying and pasting of code.

If I find myself having to do more heavily customised searches with Solr Pro, I may take a crack and decomposing the default search form to make under-the-hood customisations easier.

Perhaps instead of working on this feature, you could document what all those default Solr fields are for? That would allow me make informed decisions on tweaking the boost values of those fields.

jeffcoughlin commented 12 years ago

Well, I've been meaning to give some examples on how to do custom searches. We use them all the time.

If you're interested, you're welcome to write up examples that we can post on the documentation site :)