RE: how to search a tree node in lucene?

2017-03-05 Thread Uwe Schindler
nts can be used in both. Uwe - Uwe Schindler Achterdiek 19, D-28357 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Cristian Lorenzetto [mailto:cristian.lorenze...@gmail.com] > Sent: Sunday, March 5, 2017 6:13 PM > To: Lucene Users > Sub

Re: how to search a tree node in lucene?

2017-03-05 Thread Cristian Lorenzetto
it is lucene or solr? I m using lucene. 2017-03-05 18:06 GMT+01:00 Erick Erickson : > PathHeirarchyTokenizer? > > On Sat, Mar 4, 2017 at 5:00 PM, Cristian Lorenzetto > wrote: > > ah right ... facet ? it isnt? > > > > 2017-03-05 1:32 GMT+01:00 Cristian Lorenzetto < > cristian.lorenze...@gmail.co

Re: how to search a tree node in lucene?

2017-03-05 Thread Erick Erickson
PathHeirarchyTokenizer? On Sat, Mar 4, 2017 at 5:00 PM, Cristian Lorenzetto wrote: > ah right ... facet ? it isnt? > > 2017-03-05 1:32 GMT+01:00 Cristian Lorenzetto >: > >> Hi >> i might implement a performant solution for searching a tree node, parent >> of a node , children of a node. >> >> a

Re: how to search a tree node in lucene?

2017-03-04 Thread Cristian Lorenzetto
ah right ... facet ? it isnt? 2017-03-05 1:32 GMT+01:00 Cristian Lorenzetto : > Hi > i might implement a performant solution for searching a tree node, parent > of a node , children of a node. > > a simple idea is > > save the path to specific node > and searching prefix/suffix... > > > Is there

Re: How to search for terms containing negation

2014-03-18 Thread Jack Krupansky
Of course - you need to use the same analyzer for both indexing and query. So, just reindex your data with this new analyzer. -- Jack Krupansky -Original Message- From: Natalia Connolly Sent: Tuesday, March 18, 2014 10:37 AM To: java-user@lucene.apache.org Subject: Re: How to search

Re: How to search for terms containing negation

2014-03-18 Thread Natalia Connolly
I am afraid this did not work, Tri. Here's what I tried: List words = new ArrayList(); Boolean ignoreCase = true; CharArraySet emptyset = new CharArraySet(Version.LUCENE_47,words,ignoreCase); Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_47,emptyset); Here's what happens: Searching fo

Re: How to search for terms containing negation

2014-03-17 Thread Tri Cao
StandardAnalyzer has a constructor that takes a stop word set, so I guess you can pass it an empty set:http://lucene.apache.org/core/4_6_1/analyzers-common/org/apache/lucene/analysis/standard/StandardAnalyzer.html#StandardAnalyzer(org.apache.lucene.util.Version, org.apache.lucene.analysis.util.Char

Re: How to search for terms containing negation

2014-03-17 Thread Natalia Connolly
Hi Tri, Thank you so much for your message! Yes, it looks like the negation terms have indeed been filtered out; when I query on "no" or "not", I get no results. I am just using StandardAnalyzer and the classic QueryParser: Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_47); Que

Re: How to search for terms containing negation

2014-03-17 Thread Tri Cao
Natalia,First make sure that your analyzers (both index and query analyzers) do not filter out these as stop words. I think the standard StopFilter list has "no" and "not". You can try to see if you index have these terms by querying for "no" as a TermQuery. If there is not match for that query, th

Re: how to search a certain number of document without travelling all related documents

2013-03-14 Thread Trejkaz
On Tue, Mar 12, 2013 at 10:42 PM, Hu Jing wrote: > so my question is how to achieve a non-sort query method, this method can > get result constantly and don't travel all unnecessary doc. > > Does Lucene supply some strategies to implement this? If you want the result as soon as possible, just pa

Re: How to search multi-indice at the same time?

2011-07-23 Thread Israel Tsadok
http://lucene.apache.org/java/3_0_3/api/core/org/apache/lucene/index/MultiReader.html

Re: how to search multiple fields

2011-05-25 Thread Ian Lea
> In the first link you presented, there is one comment that "Note that terms > which occur in short fields have a higher effect on the result ranking." > > What does "short fields" mean? This is a short sentence. This is a somewhat longer sentence that may get lower scores when matched by terms

Re: how to search multiple fields

2011-05-25 Thread Cheng Zhou
Hi lan, thanks. Still two questions. In the first link you presented, there is one comment that "Note that terms which occur in short fields have a higher effect on the result ranking." What does "short fields" mean? What are the differences between the impact of the short fields and that of the

Re: how to search multiple fields

2011-05-25 Thread Ian Lea
> Quite a few Lucene examples on lines shows how to insert multiple fields > into a Document and how to query the indexed file with certain fields and > queried text. I would like to know: > > 1.       How to do a cross-field search? http://wiki.apache.org/lucene-java/LuceneFAQ#How_can_I_search_ov

Re: How to search by numbers

2010-04-19 Thread Erick Erickson
9 PM, Andy wrote: > > That works, and now that I re-test my original code, it also works. > > > Date: Mon, 19 Apr 2010 10:52:45 -0700 > > From: iori...@yahoo.com > > Subject: Re: How to search by numbers > > To: java-user@lucene.apache.org > > > > > >

RE: How to search by numbers

2010-04-19 Thread Andy
That works, and now that I re-test my original code, it also works. > Date: Mon, 19 Apr 2010 10:52:45 -0700 > From: iori...@yahoo.com > Subject: Re: How to search by numbers > To: java-user@lucene.apache.org > > > > Hi, I have indexed the following two fields: > >

Re: How to search by numbers

2010-04-19 Thread Ahmet Arslan
> Hi, I have indexed the following two fields: > org_id - NOT_ANALYZEDorg_name - ANALYZED > However when I try to search by org_id, for example, 12345, > I get no hits.  > I am using the StandardAnalyzer to index and search.  > > And I am using:  Query query = > queryParser.parse("org_id:12345")

RE: How to search multiple fields using multiple search terms

2010-04-15 Thread Andy
I am just getting started with Lucene so I didnt know you could just use a regular query parser. That seems to work. Thanks > Date: Thu, 15 Apr 2010 19:32:50 -0400 > Subject: Re: How to search multiple fields using multiple search terms > From: erickerick...@gmail.com > T

Re: How to search multiple fields using multiple search terms

2010-04-15 Thread Erick Erickson
Why are you locked into using MultiFieldQueryParser? The simpler approach is just send something like +title:abc +desc:123 through the regular query parser HTH Erick On Thu, Apr 15, 2010 at 6:34 PM, Andy wrote: > > Hi, I am trying to use the MultiFieldQueryParser to search "title" and > "de

Re: How to search "path"?

2009-07-30 Thread ohaya
Ian, I'll respond to this msg, re. searching "path". I made the change you suggested, to "Field.Index.ANALYZED", and that fixed the problem I was having with searching for components of the "path" field. Thanks! Jim Ian Lea wrote: > In contrast to your last question and reply, if you u

Re: How to search "path"?

2009-07-30 Thread Ian Lea
In contrast to your last question and reply, if you use doc.add(new Field("path", f.getPath(), Field.Store.YES, Field.Index.ANALYZED)); the path will get split into tokens which will include "myfile1" and you will be able to search for it. The key concept for both questions is analysis. Luce

Re: How to search special characters in LUcene

2009-04-27 Thread uday kumar maddigatla
hi thanks for your reply. Please suggest me what to do now. i want to index the document which contains multiple languages. I really waiting for this to complete with your help. Please,please help me Erick Erickson wrote: > > I'm puzzled why you say > > "By the above out put we can say that

Re: How to search special characters in LUcene

2009-04-24 Thread Erick Erickson
I'm puzzled why you say "By the above out put we can say that StandardAnalyzer is enough to get rid of danish elements." It does NOT get rid of the accents, according to your own output. If your goal is to go ahead and index multiple language documents in a single index then search it, I'd recom

Re: How to search special characters in LUcene

2009-04-24 Thread uday kumar maddigatla
Hi Thanks for your reply. After gone threw with the site which you given... i understood that StandardAnalyzer is enough to handle these special characters. i'm attaching one class called AnalysisDemo.java. By executing that class i'm able to say the above sentance(i.e StandardAnalyzer is enough

Re: How to search special characters in LUcene

2009-04-23 Thread Erick Erickson
OK, this is a much different problem than you were originally asking about, effectively "how to index/search mixed language documents". This topic has been discussed multiple times on the user list, I think your first step should be to search the archive. I *was* going to find the old searchable m

Re: How to search special characters in LUcene

2009-04-22 Thread uday kumar maddigatla
HI Here are the details about my goals. 1. I want to use this lucene for mixed languages. 2. I want to make indexes of the documents which are either english or danish etc. I'm attaching my IndexFiles.java file. When i'm searching i'm giving the index path location as well as doucmets folder.

Re: How to search special characters in LUcene

2009-04-22 Thread uday kumar maddigatla
HI Here are the details about my goals. 1. I want to use this lucene for mixed languages. 2. I want to make indexes of the documents which are either english or danish etc. I'm attaching my IndexFiles.java file. When i'm searching i'm giving the index path location as well as doucmets folder.

Re: How to search special characters in LUcene

2009-04-22 Thread Erick Erickson
Are you *also* using the DutchAnalyzer for your *query*? Please show us the index and search code (simplified as much as possible), then we'll be able to provide better suggestions. Also, tell us a bit more about your goals here. Is this an index entirely of Dutch documents? Or is it a mixed-lang

Re: How to search special characters in LUcene

2009-04-21 Thread uday kumar maddigatla
Hi Thanks for your reply. I'm able to see the DutchAnalyzer. When i'm indexing my documents i given instace of DutchAnalyzer as an argument to IndexWriter Class. After this when i search for the http://www.nabble.com/file/p23170710/IndexFiles.java IndexFiles.java contains the danish elements

Re: How to search special characters in LUcene

2009-04-21 Thread Erick Erickson
Take a look at DutchAnalyzer. The problem you'll have is if you're indexing this document along with a bunch of documents from other languages. You could search the mail archive for extensive discussions of indexing/ searching documents from several languages. Best Erick On Tue, Apr 21, 2009 at

Re: How to search a phrase using quotes in a query ???

2009-04-07 Thread Erick Erickson
Well, nothing jumps out at me, although I confess that I've not used MultiFieldQueryParser. So here's what I'd do. 1> drop back to a simpler way of doing things. Forget about MultiFieldQueryParser for instance. Get the really simple case working then build back up. I'd also drop back to a very bas

Re: How to search a phrase using quotes in a query ???

2009-04-07 Thread Ariel
Here is my code for indexing: [code] public static void main(String[] args) throws IOException { if(args.length==2){ String docsDirectory =args[0]; String indexFilepath = args[1]; int numIndexed = 0; IndexWriter writer; ArrayL

Re: How to search a phrase using quotes in a query ???

2009-04-06 Thread Erick Erickson
If you have luke, you should be able to submit your query and use the explain functionality to gain some insights into what the query actually looks like as well Best Erick On Mon, Apr 6, 2009 at 5:24 PM, Ariel wrote: > Well I have luke lucene, the index has been build fine. > The field whe

Re: How to search a phrase using quotes in a query ???

2009-04-06 Thread Ariel
Well I have luke lucene, the index has been build fine. The field where I am searching is the content field. I am using the same analyzer in query and indexing time: SnowBall English Analyzer. I am going to submit later the snippet code. Regards Ariel On Mon, Apr 6, 2009 at 4:37 PM, Erick Eric

Re: How to search a phrase using quotes in a query ???

2009-04-06 Thread Erick Erickson
We really need some more data. First, I *strongly* recommend you get a copy of Luke and examine your index to see what is *actually* there. Google "lucene luke". That often answers many questions. Second, query.toString is your friend. For instance, if the query you provided below is all that you'

RE: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Fang_Li
Hi, What do you mean untokenized field? Are you using different analyzer for different field? If yes, I think you just use the same analyzer (PerfieldAnalyzer, I guess) for query. Li -Original Message- From: rokham [mailto:somebodyik...@gmail.com] Sent: Monday, March 09, 2009 11:02 PM

Re: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Chris Hostetter
: Well, PerFieldAnalyzerWrapper is just a bunch of Analyzers,independent of : queries. See the API, but in general : PerFieldAnalyzerWrapper perf = new PerFieldAnalyzerWrapper("default", new : StandardAnalyzer()); : : perf.add("untokenized", new WhitespaceAnalyzer()); : perf.add("tokenized", new

Re: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Erick Erickson
Well, PerFieldAnalyzerWrapper is just a bunch of Analyzers,independent of queries. See the API, but in general PerFieldAnalyzerWrapper perf = new PerFieldAnalyzerWrapper("default", new StandardAnalyzer()); perf.add("untokenized", new WhitespaceAnalyzer()); perf.add("tokenized", new SnowballAnalyze

Re: How to search both Tokenized and Untokenized fields

2009-03-10 Thread rokham
Thanks a bunch for you very prompt reply. I looked into the PerFieldAnalyzerWrapper class and I understand how you can add a specific analyzer for each field. My question is how does this link to the query that's sent to me. If I'm given a query as follows: (+tokenized:value1 +tokenized:vaue2) (+

Re: How to search both Tokenized and Untokenized fields

2009-03-09 Thread Erick Erickson
PerFieldAnalyzerWrapper is your friend, assuming that you have separate fields, some tokenized and some not. If you *don't* have separate fields, then we need more details of what you hope to accomplish... something like (+tokenized:value1 +tokenized:vaue2) (+untokenized:value3 + untokenized:valu

Re: How to search on all fields with one query ?

2008-12-18 Thread Erick Erickson
A lot depends upon what you mean by "search across all fields". For single-term queries, that's pretty straight forward, but for, say, (a AND b) what does it mean to "search across all fields"? Should you get a hit if a appears only in field1 and b appears only in field 2? Or should you only get a

Re: How to search documents taking in account the dates ???

2008-12-18 Thread Ariel
Thank you, it works very good. Regards Ariel On Thu, Dec 18, 2008 at 8:22 AM, Erick Erickson wrote: > Use the setSort that takes an array of Sort objects... > > On Thu, Dec 18, 2008 at 8:11 AM, Ariel wrote: > > > What I am doing is this: > > > >Sort sort = new Sort(); > >

Re: How to search documents taking in account the dates ???

2008-12-18 Thread Erick Erickson
Use the setSort that takes an array of Sort objects... On Thu, Dec 18, 2008 at 8:11 AM, Ariel wrote: > What I am doing is this: > >Sort sort = new Sort(); >sort.setSort("year", true); >hits = searcher.search(pquery,sort); > > > How I must put my code to sort

Re: How to search documents taking in account the dates ???

2008-12-18 Thread John Byrne
Hi, I think this should do it... SortField dateSortField = new SortField("year", false);//the second argument reverses the sort direction if set to true SortField scoreSortField= new SortField(null, SortField.SCORE, false); // value of null for field, since 'score' is not reall

Re: How to search documents taking in account the dates ???

2008-12-18 Thread Ariel
What I am doing is this: Sort sort = new Sort(); sort.setSort("year", true); hits = searcher.search(pquery,sort); How I must put my code to sort first by date an then by score ??? Greetings Ariel On Thu, Dec 18, 2008 at 4:48 AM, Ian Lea wrote: > Lucene let

Re: How to search documents taking in account the dates ???

2008-12-18 Thread Ian Lea
Lucene lets you sort by multiple fields, including score. See the javadocs for Sort and SortField, specifically SortField.SCORE. -- Ian. On Wed, Dec 17, 2008 at 8:15 PM, Ariel wrote: > Hi: > This solution have a problem. > the results are sorted bye the year criteria but I need that after sort

Re: How to search documents taking in account the dates ???

2008-12-17 Thread Ariel
Hi: This solution have a problem. the results are sorted bye the year criteria but I need that after sort by year criteria it sort by the scoring criteria two. How can I do this ??? I hope you can help me. Greetings Ariel On Wed, Nov 19, 2008 at 5:28 PM, Erick Erickson wrote: > Well, MultiSearch

Re: How to search for "-2" in field?

2008-12-12 Thread Darren Govoni
Hi Matt, Thanks for the thought. Yeah, I see it there in Luke, but the other gentleman's idea that maybe Luke is producing different than code might be a clue. It would be odd, if true, but nothing else works so I will see if that is it. Darren On Fri, 2008-12-12 at 08:03 -0500, Matthew Hall

Re: How to search for "-2" in field?

2008-12-12 Thread Greg Shackles
I admit I only read through this thread quickly so maybe I missed something, but it sounds like you're trying different Analyzers for searching, when what you really need is to use the right analyzer during indexing. Generally you want to use the same analyzer for both indexing and searching so tha

Re: How to search for "-2" in field?

2008-12-12 Thread Matthew Hall
Are you absolutely, 100% sure that the -2 token has actually made it into your index? As a VERY basic way to check this try something like this: import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.TermEnum; public class IndexTerms { public static void main(Stri

Re: How to search for "-2" in field?

2008-12-12 Thread prabin meitei
one more thing, few times I have encountered that I get different results in Luke then in my actual code. Try in your code directly using standard analyzer and quoted query string. print your query to check if the query formed is correct (query is formed with quoted string). Can you tell what is

Re: How to search for "-2" in field?

2008-12-12 Thread Darren Govoni
Tried them all, with quotes, without. Doesn't work. At least in Luke it doesn't. On Fri, 2008-12-12 at 07:03 +0530, prabin meitei wrote: > whitespace analyzer will tokenize on white space irrespective of quotes. Use > standard analyzer or keyword analyzer. > Prabin meitei > toostep.com > > On Thu

Re: How to search for "-2" in field?

2008-12-11 Thread prabin meitei
whitespace analyzer will tokenize on white space irrespective of quotes. Use standard analyzer or keyword analyzer. Prabin meitei toostep.com On Thu, Dec 11, 2008 at 11:28 PM, Darren Govoni wrote: > I'm using Luke to find the right combination of quotes,\'s and > analyzers. > > No combination ca

Re: How to search for "-2" in field?

2008-12-11 Thread Darren Govoni
I'm using Luke to find the right combination of quotes,\'s and analyzers. No combination can produce a positive result for "-2 String" for the field 'type'. (any - ) type: 0 -2 Word analyzer: query -> rewritten = result default field is 'type'. WhitespaceAnalyzer: \"-2 ConfigurationFile\" ->

Re: How to search for "-2" in field?

2008-12-11 Thread prabin meitei
Hi, While constructing the query give the query string in quotes. eg: query = queryparser.parse("\"-2 word\""); Prabin meitei toostep.com On Thu, Dec 11, 2008 at 10:37 PM, Darren Govoni <[EMAIL PROTECTED]> wrote: > I'm hoping to do this with a simple query string, but not sure if its > possible

Re: How to search for "-2" in field?

2008-12-11 Thread Darren Govoni
I'm hoping to do this with a simple query string, but not sure if its possible. I'll try your suggestion though as a workaround. Thanks!! On Thu, 2008-12-11 at 16:48 +, Robert Young wrote: > You could do it with a TermQuery but I'm not quite sure if that's the answer > you're looking for. >

Re: How to search for "-2" in field?

2008-12-11 Thread Robert Young
You could do it with a TermQuery but I'm not quite sure if that's the answer you're looking for. Cheers Rob On Thu, Dec 11, 2008 at 3:59 PM, Darren Govoni <[EMAIL PROTECTED]> wrote: > Hi, > This might be a dumb question, but I have a simple field like this > > field: 0 -2 Word > > that is index

Re: how to search for starts with multiple words in lucene

2008-11-28 Thread naveen.a
Hi, Thanks for your replies, please go to this link for the actual problem http://www.nabble.com/SpanFirstQuery-is-not-taking-wildcard-characters-(like-*)-as-a-logical-operator-for-the-preffix-td20719556.html#a20719556 http://www.nabble.com/SpanFirstQuery-is-not-taking-wildcard-characters-(like

Re: how to search for starts with multiple words in lucene

2008-11-26 Thread AlexElba
Hi, I think you can achieve your goal using StandardAnalyzer during indexing and for search, and use WildcardQuery for Query I think it will work!! naveen.a wrote: > > Hi, > > Below is a document in lucene > - > Field Value > --

Re: how to search for starts with multiple words in lucene

2008-11-26 Thread Erick Erickson
Your problem here is probably tokenization at query time. Queries like 110_a:library a* would search field 110_a for library and your default field for a*. You might try +110a_:library +110a_:a*, but I doubt that's really what you want since there's no guarantee that the terms will be next to each

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Erick Erickson
Well, MultiSearcher is just a Searcher, so you have available all of the search methods on Searcher. One of which is: search public TopFieldDocs *search*(Query query, Filter filter, int n, Sort sort)

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Ariel
Well, this is what I am doing: queryString="year:[2003 TO 2005]" [CODE] Query pquery = null; Hits hits = null; Analyzer analyzer = null; analyzer = new SnowballAnalyzer("English"); try { pquery = MultiFieldQueryParser.parse(new String[] {queryString, queryString}, new S

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Ian Lea
Are you using one of the search methods that includes sorting? If not, then do. If you are, then you need to tell us exactly what you are doing and exactly what you reckon is going wrong. -- Ian. On Wed, Nov 19, 2008 at 6:23 PM, Ariel <[EMAIL PROTECTED]> wrote: > it is supposed lucene make a

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Ariel
it is supposed lucene make a lexicocraphic sorting but this is not hapening, Could you tell me what I'm doing wrong ? I hope you can help me. Regards On Wed, Nov 19, 2008 at 11:56 AM, Ariel <[EMAIL PROTECTED]> wrote: > Thanks, that was very helpful, but I have a question when I make the > searche

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Ariel
Thanks, that was very helpful, but I have a question when I make the searches it does not sort the results according to the range, for example: year: [2003 TO 2008] in the first page 2003 documents are showed, in the second 2005 documents, in the third page 2004 documents, I don't see any sort crit

Re: How to search documents taking in account the dates ???

2008-11-19 Thread Ian Lea
Hi - sounds like you need a range query. http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Range%20Searches -- Ian. On Wed, Nov 19, 2008 at 4:02 PM, Ariel <[EMAIL PROTECTED]> wrote: > Hi everybody: > > I need to make search with lucene 2.3.2, taking in account the dates, > previously

Re: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread Grant Ingersoll
On Oct 20, 2008, at 5:07 PM, mil84 wrote: thx :) There was also another problem with filename (because I indexed full path, not only name). But I fixed it, and now it finally works. Last question - how to get number of hits in every document (not only global number of hits)? Best would

RE: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread mil84
thx :) There was also another problem with filename (because I indexed full path, not only name). But I fixed it, and now it finally works. Last question - how to get number of hits in every document (not only global number of hits)? Best would be a simple example, if possible... -- View this me

RE: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread Steven A Rowe
On 10/20/2008 at 12:41 PM, mil84 wrote: > doc.add(new Field("Title", "hohoho", Field.Store.YES, Field.Index.TOKENIZED)); [...] > 3) Searching in title - it DON'T WORK (I try to find hohoho, and nothing). [...] > QueryParser parser = new QueryParser("title", new StandardAnalyzer()); Field names are

Re: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread mil84
Ok, better example. For example I want to search pdf file. 1) Indexing: Document doc = LucenePDFDocument.getDocument(f); doc.add(new Field("contents", new FileReader(f))); doc.add(new Field("filename", "Example.pdf", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("C

Re: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread Erick Erickson
If Grant's suggestions don't help you, some examples of your search code would be helpful to further pinpoint things... Best Erick On Mon, Oct 20, 2008 at 11:29 AM, Grant Ingersoll <[EMAIL PROTECTED]>wrote: > > On Oct 20, 2008, at 10:32 AM, mil84 wrote: > > >> I've a problem witch searching. I

Re: How to search in metadata? (filename, document title, cocument creator, ...)

2008-10-20 Thread Grant Ingersoll
On Oct 20, 2008, at 10:32 AM, mil84 wrote: I've a problem witch searching. I need to search not only in file contents, but also in metadata. But I don't know how to do it. My code: Document doc = new Document(); doc.add(new Field("contents", new FileReader(f))); writer.addDocument(doc); ..

RE: How to search

2008-08-26 Thread Jiao, Jason (NSN - CN/Cheng Du)
y to look for those that match the pattern. Br. Jason Jiao >-Original Message- >From: ext Daniel Noll [mailto:[EMAIL PROTECTED] >Sent: Tuesday, August 26, 2008 10:50 AM >To: java-user@lucene.apache.org >Subject: Re: How to search > >Venkata Subbarayudu wrote: >

Re: How to search

2008-08-25 Thread Daniel Noll
Venkata Subbarayudu wrote: Hi Anshum Gupta, Thanks for your replay, but when I gone through querySyntax-Document for Lucene, I read that Lucene does not allow queries like "*findthis" i.e. I think it doesnot allow wildcards in the beginning of the query. It has supported this for some time

Re: How to search

2008-08-25 Thread Shalin Shekhar Mangar
On Mon, Aug 25, 2008 at 5:37 PM, Karl Wettin <[EMAIL PROTECTED]> wrote: > > Is this the specific use case, that you want to handle composite words as > in javaFieldAndClassNames? There is no native support for that in Lucene to > my knowledge, but it should not be too hard to implement a TokenStre

Re: How to search

2008-08-25 Thread Anshum
Yes, and that is the reason why I said, *"it would not be advisable to have a *word like query but a word* like would be doable"* *word : is a prefix wildcard, which can be done, but its not all that straight, and still would be highly against what I would advise word* : is Doable and ok. Else if

Re: How to search

2008-08-25 Thread Karl Wettin
25 aug 2008 kl. 13.54 skrev Venkata Subbarayudu: Hi All, I am new to this Lucene, and I am using this for indexing and searching. Is it possible to search substrings using this, for example if a field holds the value "LuceneIndex" and if a give the query as Index, I want to get this

Re: How to search

2008-08-25 Thread Venkata Subbarayudu
Hi Anshum Gupta, Thanks for your replay, but when I gone through querySyntax-Document for Lucene, I read that Lucene does not allow queries like "*findthis" i.e. I think it doesnot allow wildcards in the beginning of the query. is it? Thanks, Venkata Subbarayudu. Anshum-2 wrote: > > Hi , >

Re: How to search

2008-08-25 Thread Anshum
Hi , You could use wildcard queries in that case (In case I got you right). Though because of the way the indexed terms are stored, it would not be advisable to have a *word like query but a word* like would be doable in real world environment. Hope this answers your question. -- Anshum Gupta Nau

RE: How to search on the indexed content

2008-06-24 Thread Aamir.Yaseen
You can check this code for reference. http://lucene.apache.org/java/docs/demo4.html Regards, Aamir Yaseen -Original Message- From: Lucas F. A. Teixeira [mailto:[EMAIL PROTECTED] Sent: 24 June 2008 10:57 AM To: java-user@lucene.apache.org Subject: Re: How to search on the indexed

Re: How to search on the indexed content

2008-06-24 Thread Lucas F. A. Teixeira
http://lucene.apache.org/java/docs/queryparsersyntax.html []s, Lucas Frare A. Teixeira [EMAIL PROTECTED] Tel: +55 11 3660.1622 - R3018 yugana escreveu: Hi All, I have created an index file and indexing the content retrieved from a database. How can I search on thi

Re: How to search over all fields in a clean way?

2007-08-15 Thread Erik Hatcher
copying all fields to a single searchable field is quite reasonable, and won't double your index size if you set the new field to be unstored. Erik On Aug 15, 2007, at 5:38 AM, Ridwan Habbal wrote: Hello all, when we search over an index docs we use code such: Analyzer analyzer

Re: how to search the fields in SimpleAnalyzer

2007-06-19 Thread Steven Rowe
Hi Sebastin, Sebastin wrote: > i index my document using SimpleAnalyzer() when i search the Indexed > field in the searcher class it doesnt give me the results.help me to sort > out this issue. > > My Code: > > test="9840836598" > test1="bch01" > > testRecords=(test+" "+test1); > > docum

Re: how to search the fields in SimpleAnalyzer

2007-06-19 Thread Sebastin
Hi Erick, thanks for your reply.here is the searcher class to search the document Directory fsDir = FSDirectory.getDirectory(indexDir, false); IndexSearcher is = new IndexSearcher(fsDir); QueryParser parser=new QueryParser("testRecords",new SimpleAnalyzer()); Qu

Re: how to search the fields in SimpleAnalyzer

2007-06-19 Thread Erick Erickson
I recommend you get a copy of Luke (google Lucene, luke) and examine your index. Luke will also allow you to see how various queries parse. Since you haven't shown how you parse your query, anything anyone says would be a guess. But at a guess, you may be having troubles with capitalization in yo

Re: How to search more than one word?

2007-05-24 Thread Erick Erickson
Not until you give us more information . In particular, what analyzers you use at index and search time. What the string was originally and how you indexed it. What query.toString() shows you. Best Erick On 5/24/07, Rodrigo F Valverde <[EMAIL PROTECTED]> wrote: Hi all! I implemented a search

Re: how to search over another search

2007-03-30 Thread Mohammad Norouzi
Hi Erick, Why not combine the indexes? That would be the "lucene way"... I combined them by joining tables but it gets very very large and ResaltSet failed to retrieve the fields!!! On 3/26/07, Erick Erickson <[EMAIL PROTECTED]> wrote: The short form is no. Lucene is emphatically NOT a rela

Re: how to search over another search

2007-03-27 Thread Mohammad Norouzi
sorry I cant comprehend, so why we should use two separate index? we can merge it in one index file? On 3/27/07, Steven Rowe <[EMAIL PROTECTED]> wrote: Mohammad Norouzi wrote: > Steven, > what this means: > "Each index added must have the same number of documents, but > typically each contains

Re: how to search over another search

2007-03-27 Thread Steven Rowe
Mohammad Norouzi wrote: > Steven, > what this means: > "Each index added must have the same number of documents, but > typically each contains different fields. Each document contains the > union of the fields of all documents with the same document number. > When searching, matches for a query ter

Re: how to search over another search

2007-03-27 Thread Mohammad Norouzi
Steven, what this means: "Each index added must have the same number of documents, but typically each contains different fields. Each document contains the union of the fields of all documents with the same document number. When searching, matches for a query term are from the first index added th

Re: how to search over another search

2007-03-26 Thread Steven Rowe
Oops, sorry for the confusion, I was thinking of ParallelReader, first available in Lucene-Java release 1.9: - An IndexReader which reads multiple, parallel indexes. Each index added must have the same number

Re: how to search over another search

2007-03-26 Thread Steven Rowe
Hi Mohammad, Have you looked at MultiSearcher? Section 5.6 of Lucene in Action covers its use. Steve Mohammad Norouzi wrote: > hi > I have two separated index but there are some fields that are common > betwee

Re: how to search over another search

2007-03-26 Thread Erick Erickson
The short form is no. Lucene is emphatically NOT a relational database. Of course, you could take the results of the first search, collect the IDs and query the second, but for large sets this may not be practical Why not combine the indexes? That would be the "lucene way"... There has been exte

Re: how to search over another search

2007-03-26 Thread Mohammad Norouzi
I mean when I get result from the first index, find the common records from the second index depending on first result. something like relation between two database tables, relation by primary key index1: id name somefield1 1 jack value1 2

Re: how to search over another search

2007-03-26 Thread jafarim
what do you mean by "applying the result to the second one"? On 3/26/07, Mohammad Norouzi <[EMAIL PROTECTED]> wrote: hi I have two separated index but there are some fields that are common between them. now I want to search from one index and then apply the result to the second one. what soluti

Re: how to search string with words

2006-11-21 Thread spinergywmy
Hi Erick, I did take a look at the link that u provided me, and I have try myself but I have no return reesult. My search string is "third party license readme" Below r the codes that I wrote, please point me out where I have done wrong. readerA = IndexReader.open(DsConstant.ind

Re: how to search string with words

2006-11-21 Thread spinergywmy
Hi, Thanks Martin. I have one question, what does that slop does within span near query? What is the difference between 0 and 1? I have seen the source from Lucene, one of the example putting slop as 4. Could u pls explain that to me. Thanks. regards, Wooi Meng -- View this message in contex

Re: how to search string with words

2006-11-21 Thread Martin Braun
spinergywmy schrieb: > Hi Erick, > >I did take a look at the link that u provided me, and I have try myself > but I have no return reesult. > >My search string is "third party license readme" > hhm with a quick look I would suggest that you have to split the string into individual terms,

Re: how to search string with words

2006-11-21 Thread spinergywmy
Hi guys, I have this problem searching all fields (metadata) using SpanFirstQuery. My scenario is if I just searching on one thing using SpanFirstQuery is not a problem. However, if I would have to search everything than I will not have any result return. For example, I search ba

Re: How to search with empty content

2006-10-10 Thread Erik Hatcher
thosh -Original Message- From: Scott [mailto:[EMAIL PROTECTED] Sent: Monday, October 09, 2006 8:32 PM To: java-user@lucene.apache.org Subject: Re: How to search with empty content You can get all document by using MatchAllDocsQuery. Kumar, Samala Santhosh (TPKM) wrote: I want to search without g

  1   2   >