Reputation: 151
In order to describe the problem I will give an example. Let's say we have two documents in SOLR,
{id:"0001", "make":"Ford Focus Diesel"}
{id:"0002", "make":"Ford Focus ST"}
If the client searches for "Ford Focus ST" I want SOLR to return both documents. In other words I want Diesel and ST not to be considered. It would also nice if the client searches q=id:0001 and then sorl matches the documents using the title and excluding the words ST or diesel and therefore return both documents.
Any ideas how to customize SOLR to perform like that? Should I implement my own RequestHandler or using a handler that is available? I am now looking at the MoreLikeThisHandler
Upvotes: 0
Views: 262
Reputation: 9789
If you are indexing make as text (not as strings) then what you are asking for should be happening automatically. In fact a record with any of the keywords will match.
If you are trying to match all keywords provided, you could switch to eDisMax query parser and use mm parameter to control the percentage of match required.
Upvotes: 2