Hi, I think you can use SpanQueries to do this! See: https://lucene.apache.org/core/6_2_0/core/org/apache/lucene/search/spans/package-summary.html
I have no closely looked into your problem, but you should be able to combine those queries. Alternatively subclass one of the classes to do additional position checks. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Saar Carmi [mailto:saarca...@gmail.com] > Sent: Wednesday, August 31, 2016 5:03 AM > To: java-user@lucene.apache.org > Subject: New type of proximity/fuzzy search > > Hi > I will appreciate some guidance for implementing the following type of > query. > > Given a set of search terms (t1, t2, t3, ti), return all documents where in > a sequence of x=10 tokens at least c=3 of the search terms appear within > the sequence > > So for example the following document matches the search (expand, > discount, > file, search, lookup) > > "Many of us rely on Windows Search to find files and launch programs, but > searching for text within files is limited to specific filetypes by > default. Here’s how you can *expand *your *search *to include other text > based *files*." > > Within the sequence of the last 10 words of the document the expand, files, > and search terms appear so there is a match. > > Does any documentation exist on adding new types of queries into the > Luence > engine? > > Saar --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org