Re: Help with delimited text

2011-04-07 Thread Mark Wiltshire
Thanks Ian, your a star :-)RMarkOn 7 Apr 2011, at 11:18, Ian Lea wrote:Mark - I've uploaded some code to http://pastebin.com/mqSVcWUi thatindexes and searches file system paths.  It demonstrates what I'vebeen trying to suggest and may help you get your search up andrunning.--Ian.On Thu, Apr 7, 2011

Re: Help with delimited text

2011-04-07 Thread Ian Lea
Mark - I've uploaded some code to http://pastebin.com/mqSVcWUi that indexes and searches file system paths. It demonstrates what I've been trying to suggest and may help you get your search up and running. -- Ian. On Thu, Apr 7, 2011 at 8:18 AM, Mark Wiltshire wrote: > Hi Thanks Ian for you hel

Re: Help with delimited text

2011-04-07 Thread Mark Wiltshire
Hi Thanks Ian for you help on this, its driving me nuts :-) The StandardAnalyser is only used on the search query term being passed also. But In this case I am just adding a filter to the search. The actual category may be /Top/Books/Accountancy/10_Compliance/Internatio

Re: Help with delimited text

2011-04-06 Thread Erick Erickson
A TermQuery is really dumb. It doesn't do anything at all to the input, it assumes you've done all that up front. Try parsing a query rather than using TermQuery And I suspect you'll have problems with casing, but that's another story Best Erick On Wed, Apr 6, 2011 at 6:33 AM, Mark Wilts

Re: Help with delimited text

2011-04-06 Thread Mark Wiltshire
Thanks Ian, I have managed to do that and through Luke I get My expected results. Here is now my Index Code.                StringTokenizer st = buildSubjectArea(dbConnection, oid);                int tokenCount = 0;                while (st.hasMoreTokens()){                tokenCount++;         

Re: Help with delimited text

2011-04-06 Thread Ian Lea
You can add multiple values for a field to a single document. Document doc = new Document(); String[] paths = whatever.split(","); for (String p : paths) { doc.add(new Field("path", p, whatever ...); } For searching, assuming you only want to be able to wildcard on path delimiters, you could i

Re: Help with delimited text

2011-04-05 Thread Mark Wiltshire
To add more information I am then wanting to search this field using part or all of the path using wildcards i.e. Search category_path with /Top/My Prods* Hi java-users I need some help. I am indexing categories into a single field category_path

Help with delimited text

2011-04-05 Thread Mark Wiltshire
Hi java-users I need some help. I am indexing categories into a single field category_path Which may contain items such as /Top/Books,/Top/My Prods/Book Prods/Text Books, /Maths/Books/TextBooks i.e. category paths delimited by , I want to store this field, so the Analyser tokenizes the document