Opened 12 years ago

#914 new defect

Z3950 server searches may not be logged to search stats

Reported by: simonp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.8.0
Component: General Version:
Keywords: Cc:

Description

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

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)

Change History (0)

Note: See TracTickets for help on using tickets.