Question

I have a Solr setup for full-text search. The search generally returns what I want, but for something like 'The Full Name of This Item' (no quotes), nothing is returned. I get results fine if I change it to 'The Full Name of' (again, no quotes). Also, for some searches like this, results are returned for the full name is it's in quotes and searched as a phrase. I'm new to Solr, so I could be expecting something that doesn't make sense for the technology, but I'd expect to get the same results with or without quotes, with the quotes just making the search more specific. I've included my fieldtype definition below, if that helps.

Solr FieldType definition

https://i.stack.imgur.com/HkKOR.png

Any help is greatly appreciated.

Was it helpful?

Solution

So first off you have a mismatch between what you have in your analyzer sections for indexing and for queries. While that does make sense in certain situations, it's generally not a great idea when you are just starting with Solr and with a more complex text scheme. I'd start with matching filters and tokenizers between the two and see how that works for you.

When you get to a point where having different filters between the query analyzer and the index analyzer makes sense you should do it - but you should have both a specific rationale as to why you want to do that (like a link to an example somewhere else) and a test against the baseline so that you can understand what impact your changes had.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top