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 Lucene Programatic Boolean Queries to be serialized through Builders specification #371

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

rafaharo
Copy link
Contributor

The intention of this PR is to provide a workaround to the fact that Lucene queries are not serializabled. Due to this limitation, the linkByQuery function needs to serialize the original Lucene Query object using a String that represents the query in Lucene Query Syntax

When the original query is a complex Boolean Query, specially using multi-terms keywords in some of the clauses, the Lucene Query Parser is not able to reconstruct the same original query that you would be able to build programatically.

The workaround is based on serializable query builders that are used to compose the query in the same that you would do it with original Lucene query builders. The final query is only built when needed for searching, so the query is safely serialized within the builders

Rafa Haro added 11 commits November 9, 2021 10:20
…mplementation to enable serialization of boolean queries
# Conflicts:
#	build.sbt
#	src/main/scala/org/zouzias/spark/lucenerdd/LuceneRDDKryoRegistrator.scala
#	src/main/scala/org/zouzias/spark/lucenerdd/spatial/shape/ShapeLuceneRDDKryoRegistrator.scala
#	src/test/scala/org/zouzias/spark/lucenerdd/LuceneDocToSparkRowpec.scala
#	src/test/scala/org/zouzias/spark/lucenerdd/LuceneRDDMoreLikeThisSpec.scala
#	src/test/scala/org/zouzias/spark/lucenerdd/LuceneRDDRecordLinkageSpec.scala
#	src/test/scala/org/zouzias/spark/lucenerdd/spatial/shape/ShapeLuceneRDDSpec.scala
#	version.sbt
@zouzias zouzias added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants