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

Allow multiple search index entries to be generated by one ISearchValue #173

Merged

Conversation

jackliums
Copy link
Contributor

@jackliums jackliums commented Nov 6, 2018

In SearchIndexEntryJObjectGenerator, allow multiple JObject to be created from a single ISearchValue (which is needed for composite search parameters). Since it can loop through each component, it avoids some allocations.

Migrated the code from #167.

private bool ExcludeTokenText { get; set; }
private bool IsCompositeComponent => Index != null;

private JObject CurrentEntry { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the Entry property? Having Entry and CurrentEntry properties is maybe a bit confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need parameter name so I can make that explicitly.

@jackliums jackliums merged commit 465f08b into master Nov 9, 2018
jackliums added a commit that referenced this pull request Nov 12, 2018
This is a regression from #173. When multiple requests are processed simultaneously, the collection could be updated while the enumeration is happening, which results in error.

Addresses #192
@jackliums jackliums deleted the personal/jackliu/allow-multiple-entries-to-be-generated branch November 14, 2019 15:55
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

Successfully merging this pull request may close these issues.

2 participants