Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
CreditAttribution: drunken monkey as a volunteer commented
Status:
Active
» Postponed (maintainer needs more info)
Please follow the steps in the documentation to get the Solr request (and response) for your search (I guess for two searches: one with the facet values and one with the filter present and no results).
Looking into your Solr server to see the actual tokens indexed for the field might also be helpful – but the facet values should really tell us the same already, more or less.
Also, the URL for the search with facet filter might be good to know.
I changed my integer field to fulltext in the solr "fields to index" settings and the integer field returns results.
I'm still working on getting the partial date module to return results. Changing the integer fields to fulltext in solr filed settings does not work for this module.
Thanks for pointing me to the debug documentation.
CreditAttribution: drunken monkey as a volunteer commented
The site is: pendergastkc.org/search-solr
No, I meant: What URL (i.e., with which parameters) is created for the facet item (which, when clicked, returns no results).
I looked at the page, but all facets seem to be working fine now, so can't verify it this way.
I now have the Partial_Date Year field available in the "fields to index" tab in Search API. Facets are also available.
So far so good.
I added the Year field and a text field from the Partial_Date module to the Search Api Index.
I get results from the partial_date:text fields with no problem.
But the partial_date:year field, and all of the partial_date integer fields are not being sent to Solr.
I get no values in the solr dashboard for the partial_date:year field.
So whats in the database for a field is not piped directly to Solr? Is a hook or function overriding the values?
Normally, they should go straight to Solr. (Unless you have some custom code that would prevent this.) Maybe extracting the property doesn't work correctly for some reason?
You say you have the year indexed as "Integer" on the index, right?
Then maybe try adding some debugging code (or using XDebug) to see what's going on during indexing? I.e., in SearchApiIndex::index(), what are the values returned from search_api_extract_fields(), and what data is passed to preprocessIndexItems(). And: what data comes back, is the field lost somewhere there?
This issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.
Comments
Comment #2
drunken monkeyPlease follow the steps in the documentation to get the Solr request (and response) for your search (I guess for two searches: one with the facet values and one with the filter present and no results).
Looking into your Solr server to see the actual tokens indexed for the field might also be helpful – but the facet values should really tell us the same already, more or less.
Also, the URL for the search with facet filter might be good to know.
Comment #3
jeffwpetersen CreditAttribution: jeffwpetersen commentedI changed my integer field to fulltext in the solr "fields to index" settings and the integer field returns results.
I'm still working on getting the partial date module to return results. Changing the integer fields to fulltext in solr filed settings does not work for this module.
Thanks for pointing me to the debug documentation.
The site is: pendergastkc.org/search-solr
Comment #4
drunken monkeyNo, I meant: What URL (i.e., with which parameters) is created for the facet item (which, when clicked, returns no results).
I looked at the page, but all facets seem to be working fine now, so can't verify it this way.
Comment #5
jeffwpetersen CreditAttribution: jeffwpetersen commentedI applied the property info callback patch to get fields added to Drupal.
I now have the Partial_Date Year field available in the "fields to index" tab in Search API. Facets are also available.
So far so good.
I added the Year field and a text field from the Partial_Date module to the Search Api Index.
I get results from the partial_date:text fields with no problem.
But the partial_date:year field, and all of the partial_date integer fields are not being sent to Solr.
I get no values in the solr dashboard for the partial_date:year field.
So whats in the database for a field is not piped directly to Solr? Is a hook or function overriding the values?
Comment #6
drunken monkeyNormally, they should go straight to Solr. (Unless you have some custom code that would prevent this.) Maybe extracting the property doesn't work correctly for some reason?
You say you have the year indexed as "Integer" on the index, right?
Then maybe try adding some debugging code (or using XDebug) to see what's going on during indexing? I.e., in
SearchApiIndex::index()
, what are the values returned fromsearch_api_extract_fields()
, and what data is passed topreprocessIndexItems()
. And: what data comes back, is the field lost somewhere there?Comment #7
OanaIlea CreditAttribution: OanaIlea at bio.logis Genetic Information Management GmbH commentedThis issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.