joseignm / GraFa

Faceted Browsing over Wikidata triples
http://grafa.dcc.uchile.cl
Apache License 2.0
18 stars 3 forks source link

Search by name - wildcards #7

Open kszicsillag opened 6 years ago

kszicsillag commented 6 years ago

Search by name is I assume about label property. It is not clear, if I can use wildcards (and how) or if I can search for partial matches. If I start with wildcard, it throws: Error while performing query! org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'Titanic': '' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:116) at cl.uchile.dcc.facet.web.SearchServlet.doGet(SearchServlet.java:95) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.lucene.queryparser.classic.ParseException: '*' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryparser.classic.QueryParserBase.getWildcardQuery(QueryParserBase.java:743) at org.apache.lucene.queryparser.classic.MultiFieldQueryParser.getWildcardQuery(MultiFieldQueryParser.java:245) at org.apache.lucene.queryparser.classic.MultiFieldQueryParser.getWildcardQuery(MultiFieldQueryParser.java:241) at org.apache.lucene.queryparser.classic.QueryParserBase.handleBareTokenQuery(QueryParserBase.java:841) at org.apache.lucene.queryparser.classic.QueryParser.Term(QueryParser.java:469) at org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:355) at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:244) at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:215) at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:111) ... 23 more

aidhog commented 6 years ago

It seems that you can use wildcards for the search function, though it may take a long time:

http://grafa.dcc.uchile.cl/search?lang=en&keyword=gra*

If you still have it, could you post the exact query string you entered?

kszicsillag commented 6 years ago

Start your query string with a wildcard, like this: http://grafa.dcc.uchile.cl/search?keyword=*Titanic

You will get the exception from the first post.