Hi Dat,
no we cannot remove that. In Lucene 5, Filters are deprecated and will disappear completely soon. Filtering is also done by the Query class (in fact the backwards compatibility abstract Filter class now extends Query). The needsScore is used to tell the Query if the consumer needs scores (e.g., if you add a Query using BooleanClause.FILTER to a BooleanQuery). Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen <http://www.thetaphi.de/> http://www.thetaphi.de eMail: u...@thetaphi.de From: Đạt Cao Mạnh [mailto:caomanhdat...@gmail.com] Sent: Monday, June 29, 2015 12:05 PM To: dev@lucene.apache.org Subject: Query needsScores In Lucene search, i see the check if(needsScores) in many places. Can we devide current queries to Query (that compute score) and Filter (that not compute score) and remove needsScores flag? -- Best regards, Cao Mạnh Đạt D.O.B : 31-07-1991 Cell: (+84) 946.328.329 E-mail: <mailto:caomanhdat...@gmail.com> caomanhdat...@gmail.com Hanoi University of Science and Technology School of information & communication technology Class : Computer Science K54