On 27/12/15 20:28, Mark Wharton wrote:
Hi Andy
Thanks for your help. I've integrated those changes into the main
search query and it's about 10x faster.
Just one last question... What does the OFFSET 0 bit do in the query -
force it to use the spatial/text index in preference to any other?
Hi Andy
Thanks for your help. I've integrated those changes into the main
search query and it's about 10x faster.
Just one last question... What does the OFFSET 0 bit do in the query -
force it to use the spatial/text index in preference to any other?
Mark
Technology Lead, Iotic Labs
+44
Hi Mark,
Tricky.
There isn't a good way to turn off or modify optimization for parts of a
query without affecting the whole query. Jena 3.0.1 had a combination
of changes - hash join but also stronger flattening queries into the
form you don't want for the first part.
The best I have come
Hi Andy.
That's cracked it. I was wondering about the sub-select route, but
wasn't sure how to code the intersection part. I just tweaked it to
return the score from the text query
Your formulation
200 OK (231 ms)
That's 200 OK by me...
Enjoy the holidays
Mark
Technology Lead, Iotic Labs
Hi Andy.
More experiments this morning. I originally only send you a small part
of a larger query just to expose the problem in its simplest form. And
your switches work well in that case (i.e. first formulation below
*with* the comments.)
But... There's a problem when using the switches in
On 22/12/15 07:06, Mark Wharton wrote:
Ah, wheels within wheels.
The formulation with the filter in it is fine, except that if you want
to search for more than one word or you match in label and comment then
the UNION formulation returns you duplicate rows. This isn't a problem
with the Lucene
Mark - here is another way.
This query:
SELECT ?score ?ent
WHERE {
{ ?ent spatial:nearby ( ) }
{ ?ent text:query ( . ) }
# No ?ent rdf:type iotic:Entity .
# This focuses the query on the presenting issue.
}
and then run Fuseki with the following flags:
--set
Query below run without Andy's switches.
INFO [5] 200 OK (4.985 s)
Query below run with Andy's switches.
INFO [1] 200 OK (840 ms)
Them's some magic switches. Thanks, Andy.
Do they have any impact (negative or positive) on any other SPARQL
operations? I'm only curious as you've solved our
Mark,
Thanks for the experiment results.
On 22/12/15 15:47, Mark Wharton wrote:
Query below run without Andy's switches.
INFO [5] 200 OK (4.985 s)
Query below run with Andy's switches.
INFO [1] 200 OK (840 ms)
Them's some magic switches. Thanks, Andy.
Do they have any impact
Hi Mark!
Thanks for trying my queries. I'm sorry (but not surprised!) to hear
that they weren't any better than your original query.
I think JENA-999 is really the key here - until it is implemented, I
don't know any way of speeding this up. My (very fuzzy) understanding of
ARQ is that it
Hi Osma.
Thanks for your help. It was exactly the kind of help that I wanted.
Haha, but life is rarely that simple...
I ran all your versions and my original a couple of times each to see if
there was any difference in performance.
query time1 time2
Orig4.615 4.632
1 4.648
Hi Marco.
Yes, that's it. The indexes work well in isolation, but don't combine well.
Smooshing them into a single index would be a great idea, especially if the
query could resolve both text and spatial predicates with one matching scan of
the index.
Perhaps Stephen could be persuaded to
Hi Mark!
I'm not sure that the jena-external-index approach would help. It might
or might not, depending on how it's implemented. AFAIK it's just an idea
right now, I haven't seen any code.
In any case I think the problem with jena-text and probably jena-spatial
too (not very familiar with
Hi
Thanks for this. I've read the chapter in the book and now I'm not sure
if I misunderstand your reply or you've only addressed half of the problem.
I'm not worried about the performance of the spatial search in isolation
- that's 97ms which is fine. The text search on its own takes a bit
Hi Jena users.
I'm having performance problems with a query that uses text and location
search
The query is roughly this:
SELECT ?score ?ent
WHERE {
?ent spatial:nearby(51.507999420166016 -0.1099940395355
70.01807880401611 'km') .
(?ent ?score) text:query
15 matches
Mail list logo