Class LuQueryProcessor
- java.lang.Object
-
- ai.preferred.cerebro.index.search.processor.LuQueryProcessor
-
- All Implemented Interfaces:
QueryProcessor
public class LuQueryProcessor extends java.lang.Object implements QueryProcessor
This class process aQueryRequest
into suitable query for aVersatileSearcher
then pass it to carry out the search and return result.
-
-
Constructor Summary
Constructors Constructor Description LuQueryProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryResponse
process(VersatileSearcher searcher, QueryRequest qRequest)
org.apache.lucene.search.ScoreDoc[]
processKeyword(VersatileSearcher searcher, java.lang.Object queryData, int topK)
-
-
-
Method Detail
-
process
public QueryResponse process(VersatileSearcher searcher, QueryRequest qRequest) throws java.lang.Exception
- Specified by:
process
in interfaceQueryProcessor
- Parameters:
searcher
-qRequest
-- Returns:
- Throws:
java.lang.Exception
- Process both type of query text and vector.
-
processKeyword
public org.apache.lucene.search.ScoreDoc[] processKeyword(VersatileSearcher searcher, java.lang.Object queryData, int topK) throws java.lang.Exception
- Parameters:
searcher
-queryData
-topK
-- Returns:
- Throws:
java.lang.Exception
- Handle the case when we want to query a field with a custom name, not the defaultIndexConst.CONTENTS
.
-
-