lucene index

46 views
Skip to first unread message

Tze-John Tang

unread,
May 14, 2014, 9:32:28 AM5/14/14
to sta...@clarkparsia.com
Is there any way for me to hit the lucene index directly, i.e. can I point Luke at the Waldo directory and test queries that way? I have never used Luke before, but I am getting a 'No valid directory at the location, try another location' error.


-tj

Mike Grove

unread,
May 14, 2014, 11:11:03 AM5/14/14
to stardog
I don't know anything about Luke, but you can just use the Search API [1] in Stardog to query the search index directly without going through SPARQL.

Cheers,



On Wed, May 14, 2014 at 9:32 AM, Tze-John Tang <tzejoh...@gmail.com> wrote:
Is there any way for me to hit the lucene index directly, i.e. can I point Luke at the Waldo directory and test queries that way? I have never used Luke before, but I am getting a 'No valid directory at the location, try another location' error.


-tj

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Tze-John Tang

unread,
May 14, 2014, 12:30:23 PM5/14/14
to sta...@clarkparsia.com
Luke is suposed to be able to be pointed directly at a Lucene index.


Are the contents of the Waldo directory a Lucene index? The reason why I am looking at using Luke is that it is supposed to make it easier for me to figure out why certain matches are not happening. For example right now, I am trying to match on phone numbers ending with a specific suffuix.

(?text ?score) <http://jena.hpl.hp.com/ARQ/property#textMatch> ('*5-3134' .5)

Currently in the SPARQL Query window, this does not return. When I try the same a similar query from the command line, I get the error:

Cannot parse '*5-3134': '*' or '?' not allowed as first character in WildcardQuery

That might be why the SPARQL query is not returning? When I try other search terms, which worked from SPARQL, I get "No results found for query." i.e. 

stardog query search -q "tj tang" -l 10 infrastructureDb

Would this possibly be because the data is in a named graph. The following is the query that works in SPARQL.

(?text ?score) <http://jena.hpl.hp.com/ARQ/property#textMatch> ('TJ Tang' .5) .

-tj

Mike Grove

unread,
May 14, 2014, 12:33:46 PM5/14/14
to stardog
On Wed, May 14, 2014 at 12:30 PM, Tze-John Tang <tzejoh...@gmail.com> wrote:
Luke is suposed to be able to be pointed directly at a Lucene index.


Are the contents of the Waldo directory a Lucene index? The reason why I am looking at using Luke is that it is supposed to make it easier for me to figure out why certain matches are not happening. For example right now, I am trying to match on phone numbers ending with a specific suffuix.

(?text ?score) <http://jena.hpl.hp.com/ARQ/property#textMatch> ('*5-3134' .5)

Currently in the SPARQL Query window, this does not return. When I try the same a similar query from the command line, I get the error:

Cannot parse '*5-3134': '*' or '?' not allowed as first character in WildcardQuery

Searches with a leading wildcard are disabled in Lucene by default [1], you can enable them in Stardog with the stardog.properties 'leading.wildcard.search.enabled' option. 
 


That might be why the SPARQL query is not returning? When I try other search terms, which worked from SPARQL, I get "No results found for query." i.e. 

stardog query search -q "tj tang" -l 10 infrastructureDb

Would this possibly be because the data is in a named graph. The following is the query that works in SPARQL.

Yes, 'query search' and Searcher assuming you're only searching over the default graph.

Cheers,

Mike

Mike Grove

unread,
May 14, 2014, 12:35:42 PM5/14/14
to stardog

Tze-John Tang

unread,
May 14, 2014, 4:35:44 PM5/14/14
to sta...@clarkparsia.com
On an added note. Luke does work when pointed to the Waldo directory, I just needed to pull Luke from a different location [1]. The current google code location is no longer being updated and only supports lucene 3.5.

Reply all
Reply to author
Forward
0 new messages