java plugin code for nutch using filter indexer

Ads

 
 

Share on Google+Share on Google+

hhh ahha ahh
java plugin code for nutch using filter indexer
0 Answer(s)      6 years and 6 months ago
Posted in : Java Beginners

hello: i want to write an indexer filter (aplugin for nutch) that take the arabic words from the indexer and remove the movements from this words then return them to the indexer what i should use instead of the parse.getdata() and what i should put in the doc.add(name,value) . I don't know what is the error in it. Tthis is the code:-->

  package com.mycompany.nutch.indexing;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
import org.apache.nutch.crawl.CrawlDatum;
import org.apache.nutch.crawl.Inlinks;
import org.apache.nutch.indexer.IndexingException;
import org.apache.nutch.indexer.IndexingFilter;
import org.apache.nutch.indexer.NutchDocument;
//import org.apache.nutch.parsedData.parsedData;


public class InvalidUrlIndexFilter implements IndexingFilter {

  private static final Logger LOGGER = 
    Logger.getLogger(InvalidUrlIndexFilter.class);

  private Configuration conf;

  public void addIndexBackendOptions(Configuration conf) {
    // NOOP
    return;
  }

  public NutchDocument filter(NutchDocument doc, Parse parse, Text url,
      CrawlDatum datum, Inlinks inlinks) throws IndexingException {
    if (url == null) {
      return null;
    }


 string  parsedData =parse;
    char[] parsedData = input.trim().toCharArray();
        for(int p=0;p<parsedData.length;p++)
          if(!(parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?' ||parsedData[p]=='?'||parsedData[p]=='?' ||parsedData[p]=='"' ))
            new String.append(parsedData[p]);

    return doc.add("value",parsedData);
  }

  public Configuration getConf() {
    return conf;
  }

  public void setConf(Configuration conf) {
    this.conf = conf;
  }
}

I think that the error is in using parsedData but I don't know what I should use instead of it?

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
java plugin code for nutch using filter indexer
java plugin code for nutch using filter indexer  hello: i want to write an indexer filter (aplugin for nutch) that take the arabic words from the indexer and remove the movements from this words then return them to the indexer
Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked
Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked  Can anybody say the Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked
Advertisements
java code using swings
java code using swings  code that should be able to enter data of student details using all swings into the access database using jdbc connectivity
java code using while loop
java code using while loop  
java code for PartialSearch using Map????
java code for PartialSearch using Map????  java code for Partial Search using Map
Filter collection in Java 8
Java in it. How to filter this using the Java 8? Thanks   Hi, Example of Filter collection in Java 8 You can use the following code in Java 8...Filter collection in Java 8  Hi, I have following collection
filter implementation in java
filter implementation in java   How to implement filters in java?   Java - filter implementation Tutorials Filter Files in Java Response Filter Servlet Example
code for multiplication of matrix in java using methods
code for multiplication of matrix in java using methods  code for multiplication of matrix in java using methods
parsing xml file using java code
parsing xml file using java code  parsing a xml file using java code
Hibernate Data Filter using XML
In this section, you will learn to filter data using XML mapping file
Reading RDF file using Java code in Eclipse
Reading RDF file using Java code in Eclipse  Could you please tel me what this statement means - Model model = ModelFactory.createDefaultModel
java code using combobox,radiobutton,checkbox
java code using combobox,radiobutton,checkbox  hi, send me java code for entering student details into ms access database, the code should includes combo box,radiobutton and checkboxes pl send as early as possible
View source code of a html page using java ..
View source code of a html page using java ..  I could find the html source code of a web page using the following program, http://download.oracle.com/javase/1.4.2/docs/api/java/net/URLConnection.html i could get the html code
What is the best way to filter a Java Collection?
What is the best way to filter a Java Collection?  Hi, I have... to filter a Java Collection? Thanks   Hi, In Java 8 you can use following code: List<Person> filteredPersons = persons.stream() .filter(p
Error in MySQL Procedure Using JAVA Code
Error in MySQL Procedure Using JAVA Code  The following Java code (using Connector/J to create a stored procedure on MySQL 5.0) does not execute successfully. Identify the cause and available solutions. statement.execute
determinant of n*n matrix using java code
determinant of n*n matrix using java code  Here is my code: import java.util.Scanner.*; import java.util.*; public class determinantcode { double A[][]; double m[][]; int N; public input() { Scanner s=new
Maven Dependency log-indexer >> 1.1.0
You should include the dependency code given in this page to add Maven Dependency of com.logicartisan >> log-indexer version1.1.0 in your project
filter
filter  What is filter? Can filter be used as request or response
java source code to send group mails using struts2
java source code to send group mails using struts2  code to send group mails using struts2
java source code to create mail server using struts2
java source code to create mail server using struts2  java source code to create mail server using struts2
Version of com.logicartisan>log-indexer dependency
List of Version of com.logicartisan>log-indexer dependency
Version of com.logicartisan>log-indexer dependency
List of Version of com.logicartisan>log-indexer dependency
download xml file from website using java code
download xml file from website using java code  how to download xml file from website using java code
How to detect system failure using java code - Java Beginners
How to detect system failure using java code  I am doing a project... to detect the process that make failure. I have no idea about the project so please help me. And i need some site to download java source code
java code to send email using gmail smtp server
java code to send email using gmail smtp server  please send me the java code to send email using gmail smtp server. and how to send verification code
Filter Files in Java
Filter Files in Java       Introduction The Filter File Java example code provides... parameter. Here is the code of the program : import 
source code in java for a program using class - Java Beginners
source code in java for a program using class  Dear sir/madam i want source code in java for following program: WAP which creates a class accountthat stores customer name,account number and type of account.From this derive
how to covert JPG format to Binary formart using java code..
how to covert JPG format to Binary formart using java code..  convert JPG format to Binary formart How can i convert JPG format to Binary format using java code plz help me out
retrive mails from user using java code - Java Beginners
retrive mails from user using java code   how to retrive mails as user "username"??? using java for ex: class Mail{ private String subject... MailRetriever{ public Mail[] getAllMails(String userName){ //Write code
how to send sms on mobile and email using java code
how to send sms on mobile and email using java code  hi.... I am developing a project where I need to send a confirmation/updation msg on clients... the code for the same.... thanks in advance
Using Filter in transition in Flex4
Using Filter in transitions in Flex4: We can use filter with transition. You will use some value of  filter for perform effect during change state... The syntax are following: <s:Sequence id="firstSequence" filter

Ads

 
Advertisement null

Ads