Package org.apache.solr.common

Examples of org.apache.solr.common.SolrInputDocument.addField()


    //<end id="solrj"/>
    //Add some more docs
    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://redfox.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>
    doc.addField("title", "Red Fox mocks Lazy Brown Dogs!", 5);//<co id="co.solrj.title"/>
    now = new Date();
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("description", "Once again, the Red Fox outshined the" +
            " lazy Brown Dogs to win the vaunted Tally Ho Cup, in what" +
            " has become an annual ritual.  The lazy brown " +
View Full Code Here


    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://redfox.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>
    doc.addField("title", "Red Fox mocks Lazy Brown Dogs!", 5);//<co id="co.solrj.title"/>
    now = new Date();
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("description", "Once again, the Red Fox outshined the" +
            " lazy Brown Dogs to win the vaunted Tally Ho Cup, in what" +
            " has become an annual ritual.  The lazy brown " +
            "dogs just don't seem to have the drive that Red Fox does." +
            "  The lazy Brown Dogs vow to avenge their latest defeat, " +
View Full Code Here

    doc.addField("id", "http://redfox.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>
    doc.addField("title", "Red Fox mocks Lazy Brown Dogs!", 5);//<co id="co.solrj.title"/>
    now = new Date();
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("description", "Once again, the Red Fox outshined the" +
            " lazy Brown Dogs to win the vaunted Tally Ho Cup, in what" +
            " has become an annual ritual.  The lazy brown " +
            "dogs just don't seem to have the drive that Red Fox does." +
            "  The lazy Brown Dogs vow to avenge their latest defeat, " +
            "but the group's supporters claim to have heard it all before.");
View Full Code Here

            " lazy Brown Dogs to win the vaunted Tally Ho Cup, in what" +
            " has become an annual ritual.  The lazy brown " +
            "dogs just don't seem to have the drive that Red Fox does." +
            "  The lazy Brown Dogs vow to avenge their latest defeat, " +
            "but the group's supporters claim to have heard it all before.");
    doc.addField("categories_t", "Fairy Tale, Sports");
    solr.add(doc);//<co id="co.solrj.add"/>
    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://maryLambs.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>
View Full Code Here

            "  The lazy Brown Dogs vow to avenge their latest defeat, " +
            "but the group's supporters claim to have heard it all before.");
    doc.addField("categories_t", "Fairy Tale, Sports");
    solr.add(doc);//<co id="co.solrj.add"/>
    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://maryLambs.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>

    now = new Date(10000);
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("title", "Mary's Little Lamb Stolen!.", 5);//<co id="co.solrj.title"/>
View Full Code Here

            "but the group's supporters claim to have heard it all before.");
    doc.addField("categories_t", "Fairy Tale, Sports");
    solr.add(doc);//<co id="co.solrj.add"/>
    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://maryLambs.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>

    now = new Date(10000);
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("title", "Mary's Little Lamb Stolen!.", 5);//<co id="co.solrj.title"/>
    doc.addField("description", "In an affront to all that is good and" +
View Full Code Here

    doc = new SolrInputDocument();//<co id="co.solrj.doc"/>
    doc.addField("id", "http://maryLambs.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>

    now = new Date(10000);
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("title", "Mary's Little Lamb Stolen!.", 5);//<co id="co.solrj.title"/>
    doc.addField("description", "In an affront to all that is good and" +
            " decent in this world, criminals made off with Mary's " +
            "little Lamb in a late night raid on Mary's farm." +
            "  Early suspects include a Ms. Bo Peep who weeks earlier " +
View Full Code Here

    doc.addField("id", "http://maryLambs.tamingtext.com");//<co id="co.solrj.unique"/>
    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>

    now = new Date(10000);
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("title", "Mary's Little Lamb Stolen!.", 5);//<co id="co.solrj.title"/>
    doc.addField("description", "In an affront to all that is good and" +
            " decent in this world, criminals made off with Mary's " +
            "little Lamb in a late night raid on Mary's farm." +
            "  Early suspects include a Ms. Bo Peep who weeks earlier " +
            "reported losing several sheep.  Police suspect Ms. Peep " +
View Full Code Here

    doc.addField("mimeType", "text/plain");//<co id="co.solrj.mime"/>

    now = new Date(10000);
    doc.addField("date", DateUtil.getThreadLocalDateFormat().format(now));
    doc.addField("title", "Mary's Little Lamb Stolen!.", 5);//<co id="co.solrj.title"/>
    doc.addField("description", "In an affront to all that is good and" +
            " decent in this world, criminals made off with Mary's " +
            "little Lamb in a late night raid on Mary's farm." +
            "  Early suspects include a Ms. Bo Peep who weeks earlier " +
            "reported losing several sheep.  Police suspect Ms. Peep " +
            "was going to use the lamb to bring her flock's numbers back up." +
View Full Code Here

            "reported losing several sheep.  Police suspect Ms. Peep " +
            "was going to use the lamb to bring her flock's numbers back up." +
            "  The spokesman for Ms. Peep declined comment at this " +
            "time.  Mary, however, was outraged and promises revenge " +
            "on the insensitive clod who stole her precious animals.");
    doc.addField("categories_t", "Fairy Tale, crime, sheep");
    solr.add(doc);
    //add in some random other docs
    Collection<SolrInputDocument> docs = new HashSet<SolrInputDocument>();
    for (int i = 0; i < 100; i++) {
      doc = new SolrInputDocument();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.