I began to know what I should do for range query.
1. Write an AgeQueryFilter.java which is much same as DateQueryFilter.java
2. change the plugin.xml file, add AgeQueryFilter.java with raw-field "age"
3. Change MoreIndexingFiltering.java, add a function addAge();
I have got problem in step 2, I use the raw-field = "age", and in step3
doc.add(new Field("age",ageString...)
after rebuilding the whole source code, I still got the following error:
Query: age:21-30
Parsed: gpa:"21-30"
**********X in AgeQueryFilter:\21-30\************************
***********************************************************
Exception in thread "main" java.lang.IndexOutOfBoundsException: No group 1
at java.util.regex.Matcher.group(Matcher.java:355)
at
org.apache.nutch.searcher.more.AgeQueryFilter.filter(GPAQueryFilter.java:77)
at org.apache.nutch.searcher.QueryFilters.filter(QueryFilters.java:90)
at org.apache.nutch.searcher.Query.main(Query.java:444)
How should I make the "age' field recognized by the program? Thank you.
Eric.