Hello!
I am getting odd and undesirable results when two or more facets are active. This only occurs with some pairs and other pairings return proper results.
Modules Involved
Search API
Search Facets
Ajax Facet Filters
I have a view the displays indexed fields for a content type. I have facet blocks on the page that allow users to filter the results in the view. There is a view header that displays the amount of results and the current page results, i.e. "Showing 1 - 10 of 100." I am creating/updating these nodes through the Feeds module by importing an XML file. I make sure the Search Index is indexed.
Odd Result Type 1
The pager and the results in the view header show an amount which is different from the actual view rows that are output. For example, the result count in the header might say "Showing 1 - 10 of 200" and the pager will have 20 pages, but results are only seen up to page 2. Page 3 and up are completely blank except for the pager which still shows 20 pages.
Odd Result 2
The opposite of the above occurs. The result counter will say "Showing 1 - 9" but there will be 20 results on the page.
Odd Result 3
A pager shows up with many pages but there are no results at all shown. The view header result counter does not show up. There is no "No Results" message.
One method that seems to have fixed an issue in the past was to create a new field in the content type, delete the field that seemed to cause the issue, import the XML file again, and update the facet block with the new field. I don't know if this would fix all issues and I'm hesitant to rebuild the whole thing. Any thoughts?
Comments
Comment #2
deaconzero commentedI think I have solved this now. There *seems* to be an issue for me when selecting what fields to index and using the type "Fulltext." When I switched over to the type "String" I stopped receiving conflicts. This is still odd to me as we had a previous version of this functionality working with type "Fulltext" in use. Hope this might help some folks!
Comment #3
deaconzero commentedComment #5
drupal_lib commentedThank you so much for posting your fix. I experienced similar issues after migrating to PHP 7.2 and switching from "fulltext" to "string" finally fixed the problem - I spent so much time looking for a solution! Thanks again.