question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Linker with Query type

See original GitHub issue

Describe the solution you’d like I’d like to use Lucence query builder to generate my queries instead of the query String. The toString method does not guarantee compatibility and it fails for some cases.

For example :

val addressTerms = Seq("harvard","denver")
 val booleanQueryBuilder = new BooleanQuery.Builder()

addressTerms.foreach(t=>{
          booleanQueryBuilder.add(new FuzzyQuery(new Term("address", t)), BooleanClause.Occur.SHOULD)
        })

val booleanQuery: BooleanQuery = booleanQueryBuilder.setMinimumNumberShouldMatch(addressTerms.size/2).build()
val query = booleanQuery.toString()

Produces the following exception :

(address:harvard~2 address:denver~2 )~3': Encountered " <FUZZY_SLOP> "~3 "" at line 1, column 95.

Doing a search and replace for the token “~” is not really an option because the query won’t behave as expected

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
zouziascommented, Mar 9, 2019

I think you have a valid point here and put some effort on this.

I have a prototype (see below), where you can specify a linker as a function Row => Query. Will this work for you? I tested it a bit and do not get a serialization error!

https://github.com/zouzias/spark-lucenerdd/pull/154/files#diff-4a4a384e7770d218cc77733cd7d485a9R547

Thank you a lot for the feedback / suggestion, I think such an improvement will improve a lot the API of LuceneRDD.

If you agree on the feature, I can quickly make a snapshot release to test.

0reactions
yeikelcommented, Mar 20, 2019

I added a little bit more of support in this commit https://github.com/yeikel/spark-lucenerdd/commit/3e408c7fbd884aaeaae14a9add0c4151dd904017.

Could you please review it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apollo Federation subgraph specification
Query.​​ The graph router uses this root-level Query field to directly fetch fields of entities defined by a subgraph. This field must take...
Read more >
Query work items by link or attachment count in Azure Boards
Learn how to query work items based on link type, link count, link restrictions, and attachment file count in Azure Boards.
Read more >
Passing Information via Query Strings
A query string allows you to pass information to and from a website by simply adding, or “appending,” that information to the end...
Read more >
Conversion linker - Tag Manager Help
Conversion linker tags are used to help tags measure click data so that conversions are measured effectively. Deploy a conversion linker tag on...
Read more >
Using media queries - CSS: Cascading Style Sheets | MDN
A media query is composed of an optional media type and any ... a query to test against whether the device supports hovering...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found