I do not understand why the query does not work.
I need to search for a document in by two fields. Two ID-s. It need to search for a document if 2 values match. ID1 AND ID2
But I get an empty result.
query = MultiFieldQueryParser.parse(new String[]{id1, id2},
new String[]{"ID1", "ID2"},
new SimpleAnalyzer());
TopDocs topDocs = searcher.search(query, 1);
Document doc = searcher.doc(topDocs.scoreDocs[0].doc)
The index works 100%. Verified by other requests.
Thanks for the help.