Package org.apache.lucene.gdata.search.config

Examples of org.apache.lucene.gdata.search.config.IndexSchemaField


        this.schema = new IndexSchema();
        //must be set
        this.schema.setDefaultSearchField(CONTENT_FIELD);
        this.schema.setIndexLocation("/tmp/");
        this.schema.setName(ProvidedServiceStub.SERVICE_NAME);
        IndexSchemaField field = new IndexSchemaField();
       
        field.setName(CONTENT_FIELD);
        field.setContentType(ContentType.TEXT);
       
        IndexSchemaField field1 = new IndexSchemaField();
        field1.setName(UPDATED_FIELD);
        field1.setContentType(ContentType.GDATADATE);
        this.schema.addSchemaField(field);
        this.schema.addSchemaField(field1);
        parameterMap = new HashMap<String,String[]>();
       
View Full Code Here


    private static final String FIELD = "foo";
    private static final float BOOST = 2.0f;
    ContentStrategy strategy;
   
    protected void setUp() throws Exception {
        IndexSchemaField field = new IndexSchemaField();
        field.setName(FIELD);
        field.setStore(Field.Store.YES);
        field.setIndex(Field.Index.UN_TOKENIZED);
        field.setBoost(BOOST);
        this.strategy = new TestStrategy(field);
    }
View Full Code Here

    protected void tearDown() throws Exception {
        super.tearDown();
    }
    public void testContentStrategyIndexStoreField() throws NotIndexableException{
        IndexSchemaField field = new IndexSchemaField();
        field.setName(FIELD);
       
       
        this.strategy = new TestStrategy(Field.Index.UN_TOKENIZED,Field.Store.YES,field);
        this.strategy.processIndexable(null);
        Field f = this.strategy.createLuceneField()[0];
View Full Code Here

    /*
     * Test method for 'org.apache.lucene.gdata.search.analysis.ContentStrategy.ContentStrategy(Index, Store, IndexSchemaField)'
     */
    public void testContentStrategyIndexSchemaField() throws NotIndexableException {
        IndexSchemaField field = new IndexSchemaField();
        field.setName(FIELD);
       
       
        this.strategy = new TestStrategy(field);
        this.strategy.processIndexable(null);
        Field f = this.strategy.createLuceneField()[0];
View Full Code Here

    MixedContentStrategy strategy;

    private IndexSchemaField field;

    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);

        field.setStore(Field.Store.YES);
        field.setIndex(Field.Index.UN_TOKENIZED);
        field.setBoost(BOOST);
View Full Code Here

    private static final String FIELD = "foo";
    private static final float BOOST = 2.0f;
    ContentStrategy strategy;
    private IndexSchemaField field;
    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);
        field.setStore(Field.Store.YES);
        field.setIndex(Field.Index.UN_TOKENIZED);
        field.setBoost(BOOST);
        field.setPath("/path");
View Full Code Here

    GdataCategoryStrategy strategy;

    private IndexSchemaField field;

    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);
        //store and index will be ignored
        field.setStore(Field.Store.NO);
        field.setIndex(Field.Index.TOKENIZED);
        field.setBoost(BOOST);
View Full Code Here

    ContentStrategy strategy;

    private IndexSchemaField field;

    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);
        field.setStore(Field.Store.NO);
        field.setIndex(Field.Index.TOKENIZED);
        field.setBoost(BOOST);
        field.setPath("/path");
View Full Code Here

        this.schema = new IndexSchema();
        // must be set
        this.schema.setDefaultSearchField("content");
        this.schema.setName(ProvidedServiceStub.SERVICE_NAME);
        this.schema.setIndexLocation(this.indexLocation.getAbsolutePath());
        IndexSchemaField field = new IndexSchemaField();
        field.setName("content");
        field.setPath("/somePath");
        field.setContentType(ContentType.TEXT);
        this.schema.addSchemaField(field);
        stub.setIndexSchema(this.schema);

        reg.registerService(stub);
    }
View Full Code Here

    }
   
    public void testCreateNewIndexTask() throws InterruptedException, IOException{
        this.schema.setCommitAfterDocuments(1);
        this.schema.setOptimizeAfterCommit(1);
        IndexSchemaField f = new IndexSchemaField();
        f.setName("myField");
        f.setContentType(ContentType.KEYWORD);
        f.setPath("entry/id");
        this.schema.addSchemaField(f);
        this.controller.initialize();
        ServerBaseEntry e = new ServerBaseEntry();
        e.setId("someId");
        e.setFeedId("someId");
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.search.config.IndexSchemaField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.