Re: Generating Query for Multiple Clauses in a Single Field

2009-07-29 Thread blazingwolf7
I am trying to create a query, that first will return a set of results, then it will give a boost to the results that have all the keyword entered by the user. Ahmet Arslan wrote: > > >> generate a query like the following: >> title:(+chemistry +"national curriculum") > > I didn't understand

Re: Problems with IndexWriter.commit()

2009-07-29 Thread Michael McCandless
This is certainly not expected. Can you turn on IndexWriter's infoStream and post the result? Mike On Wed, Jul 29, 2009 at 7:03 PM, Woolf, Ross wrote: > I'm experiencing a problem/unexpected behavior with IndexWriter.commit().  I > have an open IndexWriter and I am writing a lot of documents to

Re: THIS WEEK: PNW Hadoop, HBase / Apache Cloud Stack Users' Meeting, Wed Jul 29th, Seattle

2009-07-29 Thread Bradford Stephens
Don't forget this is tonight! Excited to see everyone there. On Tue, Jul 28, 2009 at 11:25 AM, Bradford Stephens wrote: > Hey everyone, > > SLIGHT change of plans. > > A few people have asked me to move to a place with Air Conditioning, > since the temperature's in the 90's this week. So, here we

Problems with IndexWriter.commit()

2009-07-29 Thread Woolf, Ross
I'm experiencing a problem/unexpected behavior with IndexWriter.commit(). I have an open IndexWriter and I am writing a lot of documents to the index (addDocument). I call a commit() and the data is committed as expected, but now as I continue to write documents to the index I have lost all ca

Re: Querying across object relationships

2009-07-29 Thread Phil Whelan
Hi Don, On Wed, Jul 29, 2009 at 1:42 PM, Donal Murtagh wrote: >    Course.name   Attendance.mandatory   Student.name >    - >    cooking                        N                      Bob >    art                                Y                      

Querying across object relationships

2009-07-29 Thread Donal Murtagh
Hi, I'm trying to use Lucene to query a domain that has the following structure Student 1---* Attendance *-1 Course The data in the domain is summarised below Course.name Attendance.mandatory Student.name - cooking

Visualizing Semantic Journal Space (large scale) using full-text

2009-07-29 Thread Glen Newton
I thought the Lucene and Solr communities would find this interesting: My collaborators and I have used LuSql, Lucene and Semantic Vectors to visualize a large scale semantic journal space (kind of like 'Maps of Science') of a large scale (5.7 million articles) journal article collection using only

RE: Multiline Regex with Lucene

2009-07-29 Thread Steven A Rowe
Hi Ba3, I think what you're asking is how to use SpanNearQuery's without specifying the number of positions between the Span's. This is answered in the article I linked to - here's the quote: > In certain situations, it can be convenient to have a SpanAndQuery. > You can easily simulate this u

Re: Multiline Regex with Lucene

2009-07-29 Thread Mark Miller
>>I came across qsol where in the paragraphseperator and sentence seperator >>can be specified and string can be searched within the paragraph. Qsol does this by using SpanQuerys. First you inject special marker tokens as your paragraph/sentence markers, then you use a SpanNotQuery that looks for a

RE: Multiline Regex with Lucene

2009-07-29 Thread ba3
Hi Steve, I went through the article. Thanks for the link. The span query mentions the position i.e n positions from the terms. The problem was like this : Lucene was made by Doug cutting If Doug is found between the words Lucene and cutting then it is a hit. [there can be any number of posit

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Simon Willnauer
:) no problem - happy to sort it out 2009/7/29 Fabrício Raphael : > Sorry guys, > > I really had other version of th Lucene (2.0). This jar was in other project > en may eclipse workspace, because I had caught other project from a friend, > to learn better to use the lucene. > > I see this when pr

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Fabrício Raphael
Sorry guys, I really had other version of th Lucene (2.0). This jar was in other project en may eclipse workspace, because I had caught other project from a friend, to learn better to use the lucene. I see this when printed what you said. But, other day it was works, and I already had caught the

Re: How do you Parse a query to convert numbers to strings

2009-07-29 Thread Paul Taylor
Uwe Schindler wrote: Actually what I ideally want I really want is for lucene to realise that when a particular field is being searched (in this case qdur) it should convert the values to allow the range to work properly, i.e by flagging a field as being numeric when you create the index.

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Simon Willnauer
Could you also provide the classpath at runtime? (System.out.println(System.getProperty("java.class.path")); simon 2009/7/29 Fabrício Raphael : > This exception happened in the two versions (2.4.1 and 2.9). > The code is this: > > package main; > > import java.io.File; > import java.io.FileNotFou

RE: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Uwe Schindler
If you compiled the code against the same JAR file like you run it, you *cannot* get this error. Does the code compile (I see no error). In my opinion, you have somewhere a really old Lucene version in your classpath (e.g. the exclipse bundled one or something like that). You can simply do a Syst

RE: Multiline Regex with Lucene

2009-07-29 Thread Steven A Rowe
Hi ba3, Did you read the Lucid Imagination article I linked to?: http://www.lucidimagination.com/blog/2009/07/18/the-spanquery/ It has examples, including specifying the term indicating the end of the span. If the article doesn't do it for you, I need more information to be able to help.

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Fabrício Raphael
This exception happened in the two versions (2.4.1 and 2.9). The code is this: package main; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.St

RE: How do you Parse a query to convert numbers to strings

2009-07-29 Thread Uwe Schindler
> Actually what I ideally want I really want is for lucene to realise that > when a particular field is being searched (in this case qdur) it should > convert the values to allow the range to work properly, i.e by flagging > a field as being numeric when you create the index. It is simple: Subclas

RE: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Uwe Schindler
So whats your problem now: You get this error with 2.9 or 2.4.1? 2.9 is backwards compatible and also supports FSDir.getDirectory(), too. Can you please send your code and the exact specification what happens with which version of lucene and against which version it was compiled. Maybe it is a bac

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Fabrício Raphael
I don't have the .jar of other lucene version. But, in a moment I used the code of the lucene 2.9dev, that is at the svn, in my classpath. And after I return to use the lucene-core-2.4.1.jar. With the code of the svn, I did other code to get the Directory instance, and it was work. The code follow

RE: How do you Parse a query to convert numbers to strings

2009-07-29 Thread Uwe Schindler
If you use Lucene 2.9 (you mentioned this), you can now use NumericRangeQuery and NumericField for fast range queries. The only problem is, that QueryParser does not support it (because we have no schema support and so query parser has no idea which type the field is -- but the new one maybe coming

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Simon Willnauer
If I recall it correctly this method was introduced in Lucene 2.1. I agree with Ian you must have a different lucene version in your classpath. Maybe you added the jar to the JDK's / JRE's ext directory or some other obscure place?! simon On Wed, Jul 29, 2009 at 4:52 PM, Ian Lea wrote: > You've

Re: Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Ian Lea
You've probably got some other version of lucene somewhere in the classpath, one that doesn't have that method in that class. It is there in 2.4.1, wasn't there in 1.4.3, so no doubt appeared somewhere in between. And is deprecated in 2.9-dev. -- Ian. 2009/7/29 Fabrício Raphael : > Hi! > > I'

Re: How do you Parse a query to convert numbers to strings

2009-07-29 Thread Paul Taylor
MilleBii wrote: It is explained in the book Lucene in Action. So you just need to do some padding on numbers and do a rangeQuery... Lucene implements a lexicographic comparison Thanks but that doesn't really address the issue. A user send a lucene query, I then just use QueryParser.parse()

Exception: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory

2009-07-29 Thread Fabrício Raphael
Hi! I'm with a error follow: java.lang.NoSuchMethodError: org.apache.lucene.store.FSDirectory.getDirectory(Ljava/io/File;)Lorg/apache/lucene/store/FSDirectory; In the code: File dirIndex = new File("index"); if (dirIndex.exists()) { dirIndex.delete(); } dirIndex.mkdir(); FSDirectory directory

Re: $ or £ symbols are excluded from Search Query

2009-07-29 Thread AHMET ARSLAN
> Within my own Application we seem to be using a custom > Analyzer that sub classes Analyzer. What is the implication of switch the > base class to WhitespaceAnalyzer? You said that you can see those characters in the lucene index, right? If yes in query parsing you can use the same custom ana

Re: $ or £ symbols are excluded from Search Query

2009-07-29 Thread cbowditch
Ahmet Arslan wrote: > > >> Can anyone tell me how I can search my index for $ or £. > > $ or £ or euro character are not reserved characters that are specified in > QueryParser. I just verified it using the code below: (in Lucene 2.4.1) > > org.apache.lucene.queryParser.QueryParser qp = new

RE: How do you Parse a query to convert numbers to strings

2009-07-29 Thread MilleBii
It is explained in the book Lucene in Action. So you just need to do some padding on numbers and do a rangeQuery... Lucene implements a lexicographic comparison - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org F

Re: $ or £ symbols are excluded from Search Query

2009-07-29 Thread AHMET ARSLAN
> Can anyone tell me how I can search my index for $ or £. $ or £ or euro character are not reserved characters that are specified in QueryParser. I just verified it using the code below: (in Lucene 2.4.1) org.apache.lucene.queryParser.QueryParser qp = new org.apache.lucene.queryParser.QueryP

Re: $ or £ symbols are excluded from Search Query

2009-07-29 Thread Erick Erickson
When you say "using Luke", you're also using a particular analyzer. I forget which one Luke defaults to, but it may well be stripping out your special characters. It's all about your analyzer, and I'm 90% certain you're using one that strips out these characters when *querying*. You can make Luke

Re: Newbie to Lucene - Questions about features

2009-07-29 Thread Erick Erickson
It Depends (tm). The thing to understand is that Lucene is a search*engine*, not an out-of-the-box product. There are products that do many of the things you're asking about that are *built* with Lucene, but it's a more complicated process than just installing it and twiddling a few configurations.

Re: How do you Parse a query to convert numbers to strings

2009-07-29 Thread Paul Taylor
Paul Taylor wrote: I think this is a common problem, but don't know the correct solution. Users were doing queries on a numeric field such as qdur:[73 TO 117] and expecting to find all the values within but this fails because lucene treats the numbers as strings and just does alphabetical sea

How do you Parse a query to convert numbers to strings

2009-07-29 Thread Paul Taylor
I think this is a common problem, but don't know the correct solution. Users were doing queries on a numeric field such as qdur:[73 TO 117] and expecting to find all the values within but this fails because lucene treats the numbers as strings and just does alphabetical search. So I now index

$ or £ symbols are excluded from Search Query

2009-07-29 Thread cbowditch
Hi All, I am using Lucene 2.2.0 and have created an Index with some text including values in $, £ and euros too! But I can't search for text that includes $, £ or euro. I checked the index with Luke and can see the $ and £ symbols in the index. When I ask Luke to explain the structure of the Quer

Re: deadlock in indexing

2009-07-29 Thread Michael McCandless
On Tue, Jul 28, 2009 at 5:10 PM, Chengdu Huang wrote: > For the deadlock, I also think it has something to do with merging. Right, what's happening here is the ConcurrentMergeScheduler, which runs BG threads to do merging, has a max thread count (default 3) that it's allowed to run at once. Beca

Newbie to Lucene - Questions about features

2009-07-29 Thread Christ4
Hi, I'm currently doing a study on Apache Lucene search engine and I'm missing some information. Does Apache Lucene is capable of: - allowing user to search in a particular website / database only? - allowing tagging ? - suggesting additional related articles on top of those already provided in

Re: deadlock in indexing

2009-07-29 Thread Simon Willnauer
On Tue, Jul 28, 2009 at 11:32 PM, Chengdu Huang wrote: > Thanks Uwe! > > I was looking at javadoc of IndexWriter in Lucene 2.4.0 and didn't > find anything about thread safety.  The wiki page does have that > though.  Thanks. http://wiki.apache.org/lucene-java/LuceneFAQ#head-c0e6aac25806df3a9402b39

2.9 - leftover (deleted) filehandles after upgrade

2009-07-29 Thread Thomas Becker
Hi everybody, we just recently upgraded to lucene 2.9 nightly build, since we needed some of the comparator fixes. We got ooms with some ScoreDocComparators which are now replaced with FieldComparators. I refactored the usages of deprecated apis and changed only small things. However during ind