Your exception is thrown because you've got a '*' as the first character of your query. By default the lucene query parser doesn't allow this, but you can override that by a call to QueryParser#setAllowLeadingWildcard(boolean). How you would do that in your setting I don't know, though.
Den tisdag 21 december 2010 skrev Schmidt, Dennis<dennis.schm...@sap.com>: > Hi all, > > I am currently using the LuceneSail on top of a > DirectTypeHierarchyInferencer, ForwardChainingRDFSInferencer and a > MemoryStore. > When using the following query, the LuceSail is obviously already working > somehow, since the queries are roughly twice as fast as before. Still not the > real performance gain I was expecting from using Lucene (side note: the > Strings are in fact only short text snippets of usually no more than 30 > characters). > ---- > SELECT entity, name, type > FROM {entity} rdfs:label {name} rdf:type {type} > WHERE name LIKE "*search this*" IGNORE CASE > ---- > The LuceneSail homepage > (http://dev.nepomuk.semanticdesktop.org/wiki/LuceneSail) introduces a > different query format for using LuceneSail, so I was using this instead to > see what happens. I changed the query to look like this then: > ---- > PREFIX search:<http://www.openrdf.org/contrib/lucenesail#> > SELECT ?entity ?name ?type WHERE { > ?entity search:matches ?match ; > rdf:type ?type . > ?match search:query "*search this*" . } > ---- > I only changed from SERQL to SPARQL because SPARQL was used in the example as > well. With this, the query is being executed correctly (meaning no Exceptions > or anything) but then, there are never any results returned and the query > execution is blazingly fast (which leads me to the conclusion it is in fact > not executed as expected). > > So am I missing something there or what might be the reason? Another to me > unexpected behaviour is that, when using a wildcard character at the > beginning of a search string, I get the following error message. Why can I > not use a wildcard at the beginning here? Doesn't make any sense to me. > ---- > org.openrdf.sail.lucene.LuceneQueryIterator - There was a problem evaluating > query '*search this*' for property 'null! > org.apache.lucene.queryParser.ParseException: Cannot parse '*search this*': > '*' or '?' not allowed as first character in WildcardQuery > ---- > > Thanks a lot in advance, > Dennis > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user