Thanks
it works
On 5/12/09, Mark Miller wrote:
> Use JavaUtilRegexCapabilities or put the Jakarata RegEx jar on your
> classpath: http://jakarta.apache.org/regexp/index.html
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
> Seid Mohammed wrote:
>> I need it similar functionality, but w
Use JavaUtilRegexCapabilities or put the Jakarata RegEx jar on your
classpath: http://jakarta.apache.org/regexp/index.html
--
- Mark
http://www.lucidimagination.com
Seid Mohammed wrote:
I need it similar functionality, but while running the above code it
breaks after outputing the following
The Jakarta regexp package is a separate download.
http://jakarta.apache.org/regexp/index.html.
--
Ian.
On Tue, May 12, 2009 at 3:21 PM, Seid Mohammed wrote:
> I need it similar functionality, but while running the above code it
> breaks after outputing the following
> =
I need it similar functionality, but while running the above code it
breaks after outputing the following
Added Knowing yourself
Added Old clinic
Added INSIDE
Added Not INSIDE
Default
regexcapabilities=org.apache.lucene.sear
That's it!!!
The problem was with the regular expression, the one I need is ".*IN"!!
Thank you so much, I was turning mad... =)
Ian Lea wrote:
>
> The little self-contained program below runs regex queries for a few
> regexps against a few phrases for both the java.util and jakarta
> regexp p
The little self-contained program below runs regex queries for a few
regexps against a few phrases for both the java.util and jakarta
regexp packages.
Output when run with lucene 2.4.1 and jakarta-regexp 1.5 is
Added Knowing yourself
Added Old clinic
Added INSIDE
Added Not INSIDE
Default
regexc
The RegexQuery class uses that package, and for that reason the expression
matches.
If my records contained only one word each, this code would work, but I need
to apply that regular expression to a phrase...
Ian Lea wrote:
>
> The default regex package is java.util.regex and I can't see anywh
The default regex package is java.util.regex and I can't see anywhere
that you tell it to use the Jakarta regexp package. So I don't think
that ".in" will match. Also, you are storing your contents field as
NOT_ANALYZED so you will need to be wary of case sensitivity. Maybe
this is what you want
This is the code for searching:
String index = "index";
String field = "contents";
IndexReader reader = IndexReader.open(index);
Searcher searcher = new IndexSearcher(reader);
System.out.println("Enter query: ");
String line = ".IN.";//in jakarta regexp this is like * IN *
RegexQuery rxquery = n
On 5/8/2009 at 9:13 AM, Ian Lee wrote:
> I'm surprised that it matches either - don't you need ".*in" where .*
> means match any character zero or more times? See the javadoc for
> java.util.regex.Pattern, or for Jakarta Regexp if you are using that
> package.
>
> Unless you're an expert in regex
I'm surprised that it matches either - don't you need ".*in" where .*
means match any character zero or more times? See the javadoc for
java.util.regex.Pattern, or for Jakarta Regexp if you are using that
package.
Unless you're an expert in regexps it is probably worth playing with
them outside y
I don't understand your regex at all. Isn't it looking for in with any
*single* character in front and back? Given your example, I don't
see how you're getting anything back at all. Is this code you're
actually executing or just an example?
What does toString and/or Explain show? Think about getti
12 matches
Mail list logo