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

Bring NRediSearch "even" with JRediSearch #1267

Merged
merged 63 commits into from
Feb 3, 2020
Merged

Bring NRediSearch "even" with JRediSearch #1267

merged 63 commits into from
Feb 3, 2020

Conversation

tombatron
Copy link
Contributor

Ported AggregationBuilder with Tests from JRediSearch.

Added Cursor support to the Client and AggregationResult.

Added RETURN support to the Query class.

Added INKEYS support to the Query class.

Added support for the FT.ALTER command.

Introduced new result type for the FT.INFO command. Removed TODO.

Updated “TestHighlightSummarize” test to match that of JRediSearch.

Added support for the FT.MGET command.

Expanded support for suggestions. Ported Suggestion class (with builder) and SuggestionOptions class (with builder).

Added ability to add multiple documents to an index with a single call.

Added ability to specify that an underlying indexed document be deleted when calling DeleteDocument.

Added ability to specify multiple documents for deletion.

Refactored IndexOptions to allow it to behave more like JRediSearch. Removed NOSCOREIDX index option as that has been deprecated.

tombatron and others added 30 commits November 1, 2019 08:03
I checked the RediSearch source and found that it's been "Unsupported
language" since at least August 28, 2018.
Index optimizations are now handled by the internal garbage collector in
the background.

https://oss.redislabs.com/redisearch/Commands.html#ftoptimize
Made the private `args` member naming more consistent the rest of the
project by prefixing with an underscore.
Kept everything as close to the original as possible.
Marked the obsolete unit test as obsolete.
@tombatron
Copy link
Contributor Author

tombatron commented Nov 5, 2019

I must have overlooked the TestStopWords test. That appears to be failing locally for me on the last assertion, though I have no idea why.

This will be fun...

[Update] I was just looking at the JRediSearch unit test wrong... Fixed.

anything to inherit from it.

Cleaned up how we're ensuring that an object to compare is not null and
is of an appropriate type.

Fixed equality check so that it doesn't blow up on null values (payload
specifically).
Added in `SetNoStopwords` method to match the JRediSearch api as well as
provide a conveinient means for keeping the default index options AND
specifying that no stopwords be considered.

Fixed `TestStopwords` unit test by specifying `STOPWORDS 0` by calling
`SetNoStopwords` which adds the `DisableStopWords` option to the
configured index options.
the new version which leverages the suggestion builder.

Added a small covering test.
@tombatron
Copy link
Contributor Author

It looks like the AggregationBuilder added the ability to FILTER and CURSOR. It shouldn't be an issue to port that to the AggregationRequest if that's the direction you wanna take.

As for why the AggregationRequest was replaced by the builder... Perhaps some kind of idiomatic Java practice?

@gkorland
Copy link
Contributor

@tombatron it was replaced as part of a code "refactoring"

@gkorland
Copy link
Contributor

p.s. @tombatron thanks for the great work, it looks great

@mgravell
Copy link
Collaborator

mgravell commented Dec 22, 2019 via email

@tombatron
Copy link
Contributor Author

tombatron commented Dec 22, 2019 via email

@NickCraver
Copy link
Collaborator

Note: I've added NRediSearch to the Linux test suite in #1316 - once that's merged, we should pull it in here to get PR testing :)

@tombatron
Copy link
Contributor Author

tombatron commented Jan 1, 2020 via email

@NickCraver
Copy link
Collaborator

Merging master in so we light up testing!

@tombatron
Copy link
Contributor Author

tombatron commented Jan 7, 2020 via email

@tombatron
Copy link
Contributor Author

Hey @NickCraver is there anything outstanding that I need to do, or are we just waiting on some extra bandwidth?

@mgravell
Copy link
Collaborator

mgravell commented Feb 3, 2020

Looking great, thanks; merging

@mgravell mgravell merged commit 9b8bdf3 into StackExchange:master Feb 3, 2020
@tombatron
Copy link
Contributor Author

tombatron commented Feb 4, 2020

Thanks @mgravell ! It was a little intimidating opening the PR but you and @NickCraver really made it as painless as possible.

@mgravell
Copy link
Collaborator

mgravell commented Feb 4, 2020

no, thank you; there's a lot of work here that I didn't have to do, which is great.

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.

4 participants