public void index(String fileName, boolean compress) throws IOException { index(new File(fileName), compress); }
public void add(String key, Set<ClassResource> value) { Document doc = new Document(); try { //if (value.size() > 1) // logger.debug(value.size() + "\t" + key + "\t" + value); doc.add(new Field(PAGE_FIELD_NAME, key, Field.Store.YES, Field.Index.NOT_ANALYZED)); doc.add(new Field(CLASS_FIELD_NAME, toByte(value, key), Field.Store.YES)); indexWriter.addDocument(doc); } catch (IOException e) { logger.error(e); } }
PageAirpediaClassIndexer formPageIndexer = new PageAirpediaClassIndexer(line.getOptionValue("index")); formPageIndexer.index(line.getOptionValue("file"), compress); formPageIndexer.close(); } catch (ParseException e) {
PageAirpediaClassIndexer pageAirpediaClassIndexer = new PageAirpediaClassIndexer(extractorParameters.getWikipediaPageAirPediaClassIndexName()); pageAirpediaClassIndexer.index(airpediaClassFileName, compress); pageAirpediaClassIndexer.close(); } catch (Exception e) { logger.error(e.getMessage());