alexshyba / SitecoreSearchContrib

Extension to Sitecore.Search namespace. Includes AdvancedDatabaseCrawler and Searcher. Make sure to check out the website for the project.
http://sitecorian.github.io/SitecoreSearchContrib
25 stars 21 forks source link

Multiple field values #9

Closed techphoria414 closed 11 years ago

techphoria414 commented 11 years ago

This is a rather substantial change to better support pulling values from index fields that have multiple values stored. (though should be non-breaking to existing implementations). Also updates the crawler to better support crawling of multi-valued fields.

Not 100% sure it's the correct approach to doing this, would definitely be open to feedback.

techphoria414 commented 11 years ago

I am going to close this for now, I think I just realized that I didn't need to refactor as aggressively as I did, since NameValueCollection supports multiple values.

techphoria414 commented 11 years ago

re-opened this, went back to using NameValueCollection, but had to make some tweaks to how it is used to ensure all field values are available. also, updated Demo pages to show and allow testing of returned values.

alexshyba commented 11 years ago

I was always wondering if this is the right way of crawling the pipe separated GUID fields. So the way I understand it, this will result in multiple fields with the same name in the document if there is more than one GUID in raw value. If this works fine, then there is no need in having the multilist, treelist and treelistEx fields be marked as "TOKENIZED". The reason why I had to do it this way is to have field values with more than one GUID be searchable.

techphoria414 commented 11 years ago

I just did a quick test of this, and confirmed that with this addition, the Multilist is searchable as both TOKENIZED and UN_TOKENIZED. The other nice aspect of this is that all values are accessible individually in the SkinnyItem.

techphoria414 commented 11 years ago

Any thoughts on pulling this one in Alex? We utilize it in Active Commerce, but can maintain our own fork if need be.

alexshyba commented 11 years ago

Nick, thanks again for your contribution. I think this is gonna work great for multilist fields. Some notes:

  1. added Checklist field association with the multilist crawler.
  2. made the fields non-stored.
  3. "Show stored values (skinny items only)" became a separate commit.

See details: sitecorian/SitecoreSearchContrib@a081b2cb754f83ba45a50ad975a0835fcf684164