You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by neda <ne...@yahoo.com> on 2007/10/25 20:44:47 UTC
adding a field to the index
Hi everyone,
I am new to nutch and am stuck at what seems a very simple edit. Someone
please help me see what step I am missing.
My end goal is to add a new field to my index. So tried to add some code to
index-more plugin. In MoreIndexingFilter.java
To start, all im trying to do is to add a constant field to the index and
see the change but that is not happening.Here's what I did:
- added the below line to the file MoreIndexingFilter.java within the method
addType.
doc.add(new Field("category", "puppies", Field.Store.YES,
Field.Index.UN_TOKENIZED));
- ran ant from nutch_home
- removed the old index folder from crawl/indexes
- ran bin/nutch index crawl/indexes crawl/crawldb crawl/linkdb
crawl/segments/*
Then when I look at my new index using Luke I don't see the field
"category". All the other fields that MoreIndexingFilter adds are there (
like primarytype ).
What am I not doing?
Thanks in advance for your help.
--
View this message in context: http://www.nabble.com/adding-a-field-to-the-index-tf4692825.html#a13413375
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: adding a field to the index
Posted by neda <ne...@yahoo.com>.
Aaaaahh! thank you so much. Finally got my field added. :)
Sebastian Steinmetz wrote:
>
> Have you copied the sources from your build-directory (usually
> nutch_home/build) to you nutch_home?
>
> Just copy over the plugins-directory.
>
> it took me 2 hours to figure it out ;)
>
> hope it is that easy :), yours
> Sebastian Steinmetz
>
> Am 25.10.2007 um 20:44 schrieb neda:
>
>>
>> Hi everyone,
>>
>> I am new to nutch and am stuck at what seems a very simple edit.
>> Someone
>> please help me see what step I am missing.
>>
>> My end goal is to add a new field to my index. So tried to add some
>> code to
>> index-more plugin. In MoreIndexingFilter.java
>>
>> To start, all im trying to do is to add a constant field to the
>> index and
>> see the change but that is not happening.Here's what I did:
>>
>> - added the below line to the file MoreIndexingFilter.java within
>> the method
>> addType.
>>
>> doc.add(new Field("category", "puppies", Field.Store.YES,
>> Field.Index.UN_TOKENIZED));
>>
>> - ran ant from nutch_home
>>
>> - removed the old index folder from crawl/indexes
>>
>> - ran bin/nutch index crawl/indexes crawl/crawldb crawl/linkdb
>> crawl/segments/*
>>
>>
>> Then when I look at my new index using Luke I don't see the field
>> "category". All the other fields that MoreIndexingFilter adds are
>> there (
>> like primarytype ).
>>
>> What am I not doing?
>>
>> Thanks in advance for your help.
>>
>> --
>> View this message in context: http://www.nabble.com/adding-a-field-
>> to-the-index-tf4692825.html#a13413375
>> Sent from the Nutch - User mailing list archive at Nabble.com.
>>
>
>
>
--
View this message in context: http://www.nabble.com/adding-a-field-to-the-index-tf4692825.html#a13413985
Sent from the Nutch - User mailing list archive at Nabble.com.
Re: adding a field to the index
Posted by Sebastian Steinmetz <s....@mederi-research.de>.
Have you copied the sources from your build-directory (usually
nutch_home/build) to you nutch_home?
Just copy over the plugins-directory.
it took me 2 hours to figure it out ;)
hope it is that easy :), yours
Sebastian Steinmetz
Am 25.10.2007 um 20:44 schrieb neda:
>
> Hi everyone,
>
> I am new to nutch and am stuck at what seems a very simple edit.
> Someone
> please help me see what step I am missing.
>
> My end goal is to add a new field to my index. So tried to add some
> code to
> index-more plugin. In MoreIndexingFilter.java
>
> To start, all im trying to do is to add a constant field to the
> index and
> see the change but that is not happening.Here's what I did:
>
> - added the below line to the file MoreIndexingFilter.java within
> the method
> addType.
>
> doc.add(new Field("category", "puppies", Field.Store.YES,
> Field.Index.UN_TOKENIZED));
>
> - ran ant from nutch_home
>
> - removed the old index folder from crawl/indexes
>
> - ran bin/nutch index crawl/indexes crawl/crawldb crawl/linkdb
> crawl/segments/*
>
>
> Then when I look at my new index using Luke I don't see the field
> "category". All the other fields that MoreIndexingFilter adds are
> there (
> like primarytype ).
>
> What am I not doing?
>
> Thanks in advance for your help.
>
> --
> View this message in context: http://www.nabble.com/adding-a-field-
> to-the-index-tf4692825.html#a13413375
> Sent from the Nutch - User mailing list archive at Nabble.com.
>