Hi,

I am using 3.4.0 and just discovered a weird issue. I have a set of simple 
English one-word queries and two target files that I want to search. One has 
all these queries in one line, i.e. something like this

Query1 Query2 Query3 Query4

The other has them one per line, i.e.

Query1
Query2
Query3
Query4

The 1st test was to index only the 1st target file and then iterate over all 
queries. The 2nd test was the same but with the 2nd file. In the first test, I 
found all the queries, as expected. In the second one, I found none! More 
specifically, the block of code

String qStr = "Query1"; // or "Query2" or ...
QueryParser parser = ...;
IndexSearcher searcher = ...;
Query query = parser.parse(qStr);
TopDocs results = searcher.search(query, Integer.MAX_VALUE);
ScoreDoc[] hits = results.scoreDocs;

returned no hits for the 2nd test.

Do I have to index the file differently? Or handle the queries differently? Or 
something else?

Thanks much,

Ilya

Reply via email to