Try our conversational search powered by Generative AI!

Search all products, regardless of Market

Vote:
 

Hi.


Is it possible to do a search for all products, regardless of which market they're on - in this situation via the LuceneProvider.

I've dug down through the code, and it seems that only if I provide MarketId in my CatalogEntrySearchCriteria do I get a result.

var criteria = new CatalogEntrySearchCriteria
            {
                IgnoreFilterOnLanguage = true,               
                MarketId = [I have to set a market ID to get a result],
                StartingRecord = 0,
                RecordsToRetrieve = Int32.MaxValue
            };


I could of course iterate across all markets and do multiple searches or implement my own Lucene access to the index; but I was just wondering if there was an 'out of the box' solution I could use?

I'm just trying to list all products in a catalog without doing a resursive type node-by-node list.

Thanks in advance

#181163
Edited, Aug 10, 2017 10:31
Vote:
 

Hi,

Without trying, I think you should be able to use some artifial value like "NONEXISTING" for MarketId. MarketId is matched by "exclusion", so as long as the value does not match any excluded markets of an entry, it should be returned.

As I said, I haven't tried it ...

#181165
Aug 10, 2017 11:01
Vote:
 

Hi.

Thanks for your reply - that actually looks like it might work. I'll try that approach.

#181166
Aug 10, 2017 11:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.