-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple field values #9
Conversation
…h a new property. existing Fields collection would only include the last seen value for a field.
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. |
… so that we can take advantage of multiple values. added feature to demo site to output/test multiple values.
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. |
@@ -79,9 +82,10 @@ | |||
<fieldType name="memo" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" /> | |||
<fieldType name="text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" /> | |||
<!-- Multilist based fields need to be tokenized to support search of multiple values --> | |||
<fieldType name="multilist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 3 lines are just for testing, right? Should these be excluded from merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well storageType="YES" allows testing of multilist values on Demo page, so up to you as to whether it's included. Safe to exclude.
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. |
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. |
Any thoughts on pulling this one in Alex? We utilize it in Active Commerce, but can maintain our own fork if need be. |
Nick, thanks again for your contribution. I think this is gonna work great for multilist fields.
See details: a081b2c |
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.