0

I'm having a bit of an issue with Facets and Apache Solr, I'm not sure whether the fault lies with Solr or the Facets API.

I am using Solr as my search engine and I get results being shown when searches are performed, also shown are the amount of matches in specified fields/facets.

E.g. I search for 'content' - there are numerous values for 'content' within different categories such as 'category1', 'category2'

The search result shows as:

category1(5)
category2(7)

Implying there are 5 results in the facet category1, and 7 results in the facet category2, these are also links, however upon clicking these links the search shows as "no results found". Odd behaviour, has anyone experienced anything like this before? if so any pointers on where to look in order to resolve the issue?

I'm hoping this question is quite clear, if not just ask and I'll try provide some more details.

Thanks, Dan.

3 Answers 3

2

This is very odd behaviour, can you ensure you are:

  • running the latest version of apachesolr (3.6.1)
  • running the latest version of the apachesolr module (7.x-1.1) OR search_api module (7.x-1.3)
  • are running the latest schema.xml and solrconfig.xml (hopefully the 3.x version)

Also, try dropping and re-creating the entire index, this normally addresses more problems.

1

There are a large number of similar issues in the relevant issue queues for both Apache Solr and Search API Solr, because this could be a result of any number of errors. Here are some basic tips:

  • Make sure you're using at least version 3.6.0 of Apache Solr (there are some outstanding bugs with Solr 1.4.x)
  • Make sure you're using the correct schema.xml, solrconfig.xml, and other configuration files with Solr (see the installation instructions, and remember to delete your sites' index and reindex your content if you've modified those files)
  • Check the Tomcat logs for your query; there should be a line for each query which includes the text "hits=123" where 123 is the number of results (if Solr is in fact returning results, your problem is specific to Drupal)
  • If you're presenting results using views and you have an exposed fulltext search filter, make sure it's set as optional and not as input required
-1

I would start by looking at how the url for the solr query is being built and testing it directly against the solr engine to see if it returns any results. I guess once you see the query built for the link you will understand why it returns 0 results. Happy hunting :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.