I am using lucene in my project and I got to one issue, that I need to find documents which contain fields with specific name. I was only able to find solutions where you creating search term containing pairs name,value like this:
IndexSearcher searcher = new IndexSearcher(directoryReader);
TermQuery query = new TermQuery(new Term("name", "value"));
TopDocs topdocs = searcher.query(query, numberToReturn);
but as I stated, I need to find documents only by provided name of field and obtain access to value of field specified by name in selected documents.
Although I am working with Lucene.NET I will be thankfull for solution in any language.
Thank you in advance.