Skip to content
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

Support for multiple fields with the same name #6

Closed
Shazwazza opened this issue Feb 27, 2015 · 0 comments
Closed

Support for multiple fields with the same name #6

Shazwazza opened this issue Feb 27, 2015 · 0 comments
Milestone

Comments

@Shazwazza
Copy link
Owner

Currently if you use DocumentWriting event and create multiple fields with the same name, it will index just fine since Lucene supports that. However, when you search you will get a dictionary error because it is trying to add the same field to the dictionary multiple times.

Since we cannot change the dictionary result since that is a breaking change, we'll support this by doing the following:

The normal dictionary of values will contain the first value, however the there's a new method on the SearchResult object: public IEnumerable<string> GetValues(string key) which will give you all of the values indexed for that field. This method will never return null, if a key doesn't exist at all an empty collection is returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant