query_lucene.py
def remove_duplicates(self, hits):
		"""
		remove duplicates (regarding the text field) from a scoreDocs object
		:param hits: the scoreDocs object resulting from a query
		:return: the scoreDocs object without duplicates
		"""
		seen = set()
		keep = []

		for i in range(len(hits)):
			if hits[i]["Text"] not in seen:
				seen.add(hits[i]["Text"])
				keep.append(hits[i])

		return keep

		remove duplicates (regarding the text field) from a scoreDocs object
		:param hits: the scoreDocs object resulting from a query
		:return: the scoreDocs object without duplicates
		
remove duplicates (regarding the text field) from a scoreDocs object
remove duplicates ( regarding the text field ) from a scoreDocs object
def remove_duplicates(self, hits):
		seen = set()
		keep = []
		for i in range(len(hits)):
			if hits[i]["Text"] not in seen:
				seen.add(hits[i]["Text"])
				keep.append(hits[i])
		return keep
def remove_duplicates ( self , hits ) : seen = set ( ) keep = [ ] for i in range ( len ( hits ) ) : if hits [ i ] [ "Text" ] not in seen : seen . add ( hits [ i ] [ "Text" ] ) keep . append ( hits [ i ] ) return keep
remove duplicates (regarding the text field) from a scoreDocs object
remove duplicates ( regarding the text field ) from a scoreDocs object
"""
		remove duplicates (regarding the text field) from a scoreDocs object
		:param hits: the scoreDocs object resulting from a query
		:return: the scoreDocs object without duplicates
		"""
the scoreDocs object without duplicates
the scoreDocs object without duplicates
self
hits
the scoreDocs object resulting from a query
the scoreDocs object resulting from a query