-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi Pavel,
in-lines...
> <mailto:
marcel.k...@springernature.com>> wrote:
>
> Thanks for the suggestions Pavel. Unfortunately, it doesn't seem
> to work for us.
>
> Filtering first for
>
> <tag:stardog:api:property:textMatch> ('ben')
>
> returns only results having 'ben' as a separate term, not those
> containing it as a sub-string:
>
> Ben-Hex Ben-u-ron BeN <g>
>
> I'm also far from being a Lucene expert, might need to dig a bit
> deeper for alternative syntax. Any suggestions from your team are
> very welcome.
>
>
>> I thought from the previous email that this is where wildcards
>> help (if you don't use scoring), no?
Yeah, agreed - but if I use 'ben*' then I don't need any additional
filter any more, because it will already return only terms *starting*
with 'ben'. But I still need to fetch quite a large number of
full-text hits, since otherwise I don't get the short candidates. I
presume they are always returned in Lucene-score order, no matter if I
intend to use the score or not.
Sorry, that might be a bit cryptic. Examples:
{
select ?urn ?label ?score where {
(?label ?score) <tag:stardog:api:property:textMatch> ('ben*' 100000).
FILTER(STRSTARTS(?label,"ben")) .
?urn smt:modLabel ?label .
}
}
?urn smt:orgLabel ?orgLabel .
}
order by (STRLEN(?label)) ?label
limit 10
- -> STRSTARTS filter is unnecessary, performance not satisfying (as
expected)
(?label ?score) <tag:stardog:api:property:textMatch> ('ben*' 100000).
?urn smt:modLabel ?label .
?urn smt:orgLabel ?orgLabel .
}
order by (STRLEN(?label)) ?label
limit 10
- -> performance not satisfying, since I have to fetch too many text
matches in order to get all results I expect (i.e., doesn't work with
10000 rather than 100000)
ok, will turn on the search feature on our 4.1.2 and test
>
>
>
> 2. I think I might have mentioned that before: full-text search
> returns 0 results once I put it *alone* into a sub-query. Some
> issue about binding variables from full-text search?
>
>
>> Hm, I can't recall. Can you show the exact query so I can try to
>> reproduce?
Just tried to reproduce ... and I can't. Uuups. Probably I messed
something up before, sorry for the false alarm!! ;)
Should I ever come across it again, I'll let you know.
Cheers,
Marcel
>
>> Thanks, Pavel
>
>
>
>
> Cheers, Marcel
>
>
>
> On 02/08/16 15:18, Pavel Klinov wrote:
>> Hi Marcel,
>
>> I think using wildcards turns Lucene queries into constant-score
>> queries so by using wildcards you essentially throw away the
>> ranking. I'll need to double check though (I'm no Lucene
>> expert).
>
>> The main performance bottleneck in such queries is that FILTERs
>> with predicates such as STRSTARTS are applied to a lot of
>> literals. If you can use a full-text predicate in the same query
>> which would cut down the number of literals, e.g. to those
>> having 'Ben' somewhere, then applying the FILTER on top of that
>> should be faster (as well as ordering the results). The Stardog
>> query optimizer should first apply the search predicate and then
>> FILTERs in such cases. So the trick is to use a full-text
>> predicate which will match a superset of what you need.
>
>> Can't say much about custom scoring at this point but we can
>> look at that in the future.
>
>> Best, Pavel
>
>> On Tue, Aug 2, 2016 at 6:53 AM, Marcel Karnstedt-Hulpus
>> <
marcel.k...@springernature.com
> <mailto:
marcel.k...@springernature.com>
>> <mailto:
marcel.k...@springernature.com
>> <mailto:
mayurb...@gmail.com <mailto:
mayurb...@gmail.com>>
> <mailto:
mayurb...@gmail.com <mailto:
mayurb...@gmail.com>>> wrote:
>>>>
>>>> Hello Pavel,
>>>>
>>>> The link you shared was a question asked by one of my
>>>> colleague. We do not have the option of having full text
>>>> search. We need to show results as user types in words,
>>>> hence we require that partial matches should be displayed.
>>>>
>>>> Thank you, Mayur
>>>>
>>>> On Monday, August 1, 2016 at 3:02:58 PM UTC+5:30, Pavel
>>>> Klinov wrote:
>>>>
>>>> It seems that your question is essentially a duplicate of
>>>> [1]. Please try the suggestion given there.
>>>>
>>>> Best, Pavel
>>>>
>>>> [1]
>>>>
>>
https://groups.google.com/a/clarkparsia.com/d/msg/stardog/wxMSKxQ4rbs/UjPWL4-rBAAJ
>>>>
>>>>
>
>>
>
> <
https://groups.google.com/a/clarkparsia.com/d/msg/stardog/wxMSKxQ4rbs/UjPWL4-rBAAJ>
>>>>
>>>>
>
On Mon, Aug 1, 2016 at 11:05 AM, Mayur Barge
>>>> <
mayurb...@gmail.com <mailto:
mayurb...@gmail.com>
> <mailto:
sta...@clarkparsia.com <mailto:
sta...@clarkparsia.com>> To
>> <mailto:
stardog%2Bu...@clarkparsia.com
> <mailto:
stardog%252Bu...@clarkparsia.com>> For more options, visit
> <mailto:
sta...@clarkparsia.com <mailto:
sta...@clarkparsia.com>> To
>> <mailto:
stardog%2Bu...@clarkparsia.com
> <mailto:
stardog%252Bu...@clarkparsia.com>> For more options, visit
> <mailto:
sta...@clarkparsia.com <mailto:
sta...@clarkparsia.com>>
>> <mailto:
stardog%2Bu...@clarkparsia.com
> <mailto:
stardog%252Bu...@clarkparsia.com>> <javascript:>
>> <mailto:
stardog%2Bu...@clarkparsia.com
> <mailto:
stardog%252Bu...@clarkparsia.com>> <javascript:>.
> <mailto:
sta...@clarkparsia.com <mailto:
sta...@clarkparsia.com>>
>> <mailto:
stardog%2Bunsu...@clarkparsia.com
> <mailto:
stardog%252Buns...@clarkparsia.com>> For more
>> <mailto:
stardog%2Bunsu...@clarkparsia.com
> <mailto:
stardog%252Buns...@clarkparsia.com>>
>>> <mailto:
stardog+u...@clarkparsia.com
> <mailto:
stardog%2Bunsu...@clarkparsia.com>
>> <mailto:
stardog%2Bunsu...@clarkparsia.com
> <mailto:
stardog%252Buns...@clarkparsia.com>>>.
> <mailto:
sta...@clarkparsia.com <mailto:
sta...@clarkparsia.com>>
>> <mailto:
stardog%2Bunsu...@clarkparsia.com
> <mailto:
stardog%252Buns...@clarkparsia.com>> For more
iQEcBAEBCgAGBQJXoNykAAoJELjmZAjIQprm1L8H/1Wrfx9LBas5TTkangmD/r6b
pTPHzFN6lMC32z/LRanv8nEofOiKJwv9sYqZucYczT4ZcmFhk9pzZZel2NrT2KRO
ttFba12J16pj0YJ4AkV//wwTOLiKi2NAMgD7+Um27Ipz+QyxUgqas28tfp/9sWOl
P/uO6aKq8HOWyAwDRjdK3X/hM3c1/obu3rKqnw+t7DhAbwrKU1NXHQQYwZ/KUH3S
lFktPyvt0Jb7mtkdzeVf4kEl62hmx2W7tHY07CjjZmMH3Jq9WEgE28sohA/zYQqg
KLwdt1VmOQo3L6ypuCEaNIfvY6ChOtda244+TAfNT5VCJdlxDh1/5sIr8VPwSV8=
=/O4T
-----END PGP SIGNATURE-----