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.

can't use LUCENE and NEAR in the same query

See original GitHub issue

orientdb:

  2.1.5

query:

select @rid from MyClass where name LUCENE 'test*' and  ([address.lat,address.lng,$spatial] NEAR [35.6129021,13.44560550000002,{"maxDistance": 5}])

MyClass has an embedded property “address” with lat and lng

error is:

OQueryParsingException: Error on parsing command at position #0: Incompatible conditions found: name LUCENE ? [address.lat, address.lng, $spatial] NEAR [?, ?, {"maxDistance": ?}] 

performing

select @rid from MyClass where name LUCENE 'test*'

or

select @rid from MyClass where ([address.lat,address.lng,$spatial] NEAR [35.6129021,13.44560550000002,{"maxDistance": 5}])

works…

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wolf4oodcommented, Oct 18, 2016

@anegrin This should be fixed in 2.2.x. Just check in 2.2.x and worked without problem.

Thanks

0reactions
wolf4oodcommented, Nov 2, 2015

@anegrin

there is indeed now the static check for multiple lucene condition. We will remove it in the next release

Read more comments on GitHub >

github_iconTop Results From Across the Web

not query in lucene - Stack Overflow
The short answer is that this is not possible using the standard Lucene. Lucene does not allow NOT queries as a single term...
Read more >
Query Parser Syntax - Apache Lucene
Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries). To perform a single character wildcard search ......
Read more >
Chapter 3. Adding search to your application - Lucene in ...
Lucene's search methods require a Query object. Parsing a query expression is the act of turning a user-entered textual query such as “mock...
Read more >
Lucene query syntax - Azure Cognitive Search | Microsoft Learn
Reference for the full Lucene query syntax, as used in Azure Cognitive Search for wildcard, fuzzy search, RegEx, and other advanced query ......
Read more >
Lucene query syntax | Kibana Guide [8.5] - Elastic
To use the Lucene syntax, open the Saved query menu, and then select Language: KQL > Lucene. Click the circle icon for the...
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