Open ankush06 opened 1 month ago
As a workaround, i updated search_handlers to update pk from ID.
` def bulk_fetch_results(self, paginated_results):
objects = []
models_pks = loaded_objects = {}
for result in paginated_results:
result.pk = result.id.split('.')[-1]
models_pks.setdefault(result.model, []).append(result.pk)`
Found a bug? Please fill out the sections below.
Issue Summary
Product category query is not properly mapping solr-product ID to product pk. The pk is populated with MSB bit when product ID is more than 9. Example if product ID in solr is "catalogue.product.11" then product pk becomes 1. This cause a product with pk 1 to display instant of product 11.![image](https://github.com/user-attachments/assets/013bdd11-0184-4f0f-a473-386819bcb21f)
Steps to Reproduce
Template should render all the product.
Technical details
Settings
HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', 'URL': 'http://127.0.0.1:8983/solr/sandbox', 'ADMIN_URL': 'http://127.0.0.1:8983/solr/admin/cores', 'INCLUDE_SPELLING': True, }, } HAYSTACK_SEARCH_RESULTS_PER_PAGE=20 HAYSTACK_ITERATOR_LOAD_PER_QUERY=20 HAYSTACK_ID_FIELD='id' HAYSTACK_DJANGO_CT_FIELD="django_ct" HAYSTACK_DJANGO_ID_FIELD= 'django_id' #default django_id HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor