-
Notifications
You must be signed in to change notification settings - Fork 86
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
Solr4 join support #88
Open
rlskoeser
wants to merge
16
commits into
tow:master
Choose a base branch
from
rlskoeser:solr4-join-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… with django paginator
… with django paginator
Conflicts: sunburnt/search.py
…oins for nonzero check, etc
Updated pull request with a fix for join queries when combined with other searches. Also added join logic to a few other places I missed (nonzero check, etc). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for Solr 4 join queries based on the examples at http://wiki.apache.org/solr/Join
I added the join logic based on how range queries are handled in the LuceneQuery class.
I added some test cases and documentation. I wasn't sure how to test the error handling (e.g. attempting to join on fields not defined in the schema) as I couldn't find any tests that were similar enough to adapt.
I haven't used join queries very extensively yet, so it's entirely possible I'm assuming something I shouldn't or oversimplifying, but this code does successfully generate working join queries against actual my data.
As far as I can tell, the join query syntax only allows for one associated search term, but the code I added doesn't currently enforce this. If more than one search term is added to the join they will be added to the query but not given the context of the join. Should it not allow more than one term? Or perhaps it could automatically generate separate join requests if there are multiple terms - this way calling code wouldn't have to call join method repeatedly for multiple filters on the same join.
FYI, it looks like my editor settings have stripped out some whitespace and introduced some changes that aren't entirely relevant. My apologies for that, let me know if you want me to do something about it.