[GeoNetwork-devel] [GeoNetwork opensource Developer website] #914: Z3950 server searches may not be logged to search stats

#914: Z3950 server searches may not be logged to search stats
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------
queryInfo in SearchLogger.java is not created correctly for some searches
through Z3950 server eg.

Search Z3950 server using yaz-client on title:

yaz-client
open localhost:6668/geonetwork-local
f @attr 1=4 africa

results in lucene query of:

+(altTitle:"africa" title:"africa") +_isTemplate:n

This does not get parsed correctly by extractQueryTerms in
web/src/main/java/org/fao/geonet/kernel/search/log/SearcherLogger.java

[QueryInfo fields: luc. type : PHRASE_QUERY field : null
text : null similarity: 1.4E-45 lowerText : null
upperText : null inclusive : false , QueryInfo fields:
luc. type : PHRASE_QUERY field : null text : null
similarity: 1.4E-45 lowerText : null upperText : null
inclusive : false ]

field and text are nulls this causes an NPE later:

{{{

at
org.fao.geonet.kernel.search.log.QueryRequest.isSimpleQuery(QueryRequest.java:221)
         at
org.fao.geonet.kernel.search.log.SearcherLogger.logSearch(SearcherLogger.java:116)
         at
org.fao.geonet.kernel.search.LuceneSearcher$SearchLoggerTask.run(LuceneSearcher.java:1705)
         at org.fao.geonet.util.ThreadPool.runTask(ThreadPool.java:70)
         at org.fao.geonet.util.ThreadPool.runTask(ThreadPool.java:66)
         at
org.fao.geonet.kernel.search.LuceneSearcher.search(LuceneSearcher.java:196)

}}}

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/914&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.