Re: PostingsHighlighter/PassageFormatter has zero matches for some results

2013-10-14 Thread Robert Muir
are your documents large? try PostingsHighlighter(int) ctor with a larger value than DEFAULT_MAX_LENGTH. sounds like the passages you see with matches are very deep into the document and its just hitting the default limit and returning the default summarization (getEmptyHighlight()) otherwise, p

Re: Natural Sort Order

2013-10-14 Thread Yonik Seeley
On Mon, Oct 14, 2013 at 9:43 PM, Darren Hoffman wrote: > Can anyone tell me if a search based on a ConstantScoreQuery should return > the results in the order that the documents were added to the index? The order will be internal docid, which used to be the order that docs were added to the index

Natural Sort Order

2013-10-14 Thread Darren Hoffman
Can anyone tell me if a search based on a ConstantScoreQuery should return the results in the order that the documents were added to the index? I am not sorting the results and this works for one index I've build but not another one. The indexes are generated in similar fashion but the index that

Re: PostingsHighlighter/PassageFormatter has zero matches for some results

2013-10-14 Thread Jon Stewart
I upgraded to 4.5. Same results, unfortunately. Most docs in the result set will have a Passage where numMatches() > 0, but some do not. In these cases, the Passage array's length is greater than zero. Jon On Mon, Oct 14, 2013 at 5:24 PM, Robert Muir wrote: > did you try the latest release? Th

RE: QueryParser stripping off Hyphen from query

2013-10-14 Thread raghavendra.k.rao
Could you please suggest which Analyzer to use in this case? I haven’t yet explored much with Analyzers. I've always used the StandardAnalyzer. Regards, Raghu -Original Message- From: Uwe Schindler [mailto:u...@thetaphi.de] Sent: Monday, October 14, 2013 6:38 PM To: java-user@lucene.a

RE: QueryParser stripping off Hyphen from query

2013-10-14 Thread Uwe Schindler
The problem is not query parser, it is your analyzer. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: raghavendra.k@barclays.com > [mailto:raghavendra.k@barclays.com] > Sent: Tuesday, October 15,

QueryParser stripping off Hyphen from query

2013-10-14 Thread raghavendra.k.rao
Hi, I am using the regular QueryParser to form a PhraseQuery. It works fine, but when it consists of a hyphen, it gets removed, hence resulting in unexpected results. Note: I am NOT using the QueryParser.escape() method before parse() method as it results in a BooleanQuery, while I want a Phra

Re: PostingsHighlighter/PassageFormatter has zero matches for some results

2013-10-14 Thread Robert Muir
did you try the latest release? There are some bugs fixed... On Mon, Oct 14, 2013 at 2:11 PM, Jon Stewart wrote: > Hello, > > I've observed that when using PostingsHighlighter in Lucene 4.4 that > some of the responsive documents in TopDocs will have zero matches in > the associated array of Pass

PostingsHighlighter/PassageFormatter has zero matches for some results

2013-10-14 Thread Jon Stewart
Hello, I've observed that when using PostingsHighlighter in Lucene 4.4 that some of the responsive documents in TopDocs will have zero matches in the associated array of Passage objects. I.e., in the call of PassageFormatter.format(), there will be some calls where none of the Passage objects in t

Re: wildcard search not working on file paths

2013-10-14 Thread Ian Lea
You seem to be indexing paths delimited by backslash then saying a search for Samples/* doesn't match anything. No surprises there, if I've read your code correctly. Since you are creating wildcard queries directly from Terms I don't think that lucene escaping is relevant here, But the presence

Re: wildcard search not working on file paths

2013-10-14 Thread nischal reddy
Hi Ian, Please find a sample program below which better illustrates the scenario public class TestWriter { public static void main(String[] args) throws IOException { createIndex(); searchIndex(); } public static void createIndex() throws IOException { Di

Re: wildcard search not working on file paths

2013-10-14 Thread Ian Lea
Seems to me that it should work. I suggest you show us a complete self-contained example program that demonstrates the problem. -- Ian. On Mon, Oct 14, 2013 at 12:42 PM, nischal reddy wrote: > Hi Ian, > > Actually im able to do wildcard searches on all the fields except the > "filePath" field

Superslow search on a single 600MB index segment

2013-10-14 Thread Igor Shalyminov
Hello! I'm trying to realize how I can improve search performance for my task. The index is as follows: - 29 segments, each of about 600 MB; - in the complete setup, there's a thread for each segment searcher; - index contains TermVectors with positions and payloads for word-level fields, and So

Re: wildcard search not working on file paths

2013-10-14 Thread nischal reddy
Hi Ian, Actually im able to do wildcard searches on all the fields except the "filePath" field. I am able to do both the leading and trailing wildcard searches on all the fields, but when i do the wildcard search on filepath field it is somehow not working, an eg file path would look some thing li

Re: wildcard search not working on file paths

2013-10-14 Thread Ian Lea
Do some googling on leading wildcards and read things like http://www.gossamer-threads.com/lists/lucene/java-user/175732 and pick an option you like. -- Ian. On Mon, Oct 14, 2013 at 9:12 AM, nischal reddy wrote: > Hi, > > I have problem with doing wild card search on file path fields. > > i ha

Re: Calculating min, max and sum of a field in docs returned by search [SEC=UNOFFICIAL]

2013-10-14 Thread Ian Lea
I'd start with the simple approach of a stored field and only worry about performance if you needed to. Field caching would likely help if you did need to. -- Ian. On Mon, Oct 14, 2013 at 2:04 AM, Stephen GRAY wrote: > UNOFFICIAL > Hi everyone, > > I'd appreciate some help with a problem I'm

wildcard search not working on file paths

2013-10-14 Thread nischal reddy
Hi, I have problem with doing wild card search on file path fields. i have a field "filePath" where i store complete path of files. i have used StringField to store the field ("i assume by default StringField will not be tokenized") . doc.add(new StringField(FIELD_FILE_PATH,resourcePath, Store.