Package org.springframework.data.solr.core.query

Examples of org.springframework.data.solr.core.query.SimpleStringCriteria


    Assert.assertNull(solrQuery.get("q.op"));
  }

  @Test
  public void testWithoutDefaultOperator() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNull(solrQuery.get("q.op"));
  }
View Full Code Here


    Assert.assertNull(solrQuery.get("q.op"));
  }

  @Test
  public void testWithNullDefaultOperator() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setDefaultOperator(null);
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNull(solrQuery.get("q.op"));
  }
View Full Code Here

    Assert.assertNull(solrQuery.get("q.op"));
  }

  @Test
  public void testWithTimeAllowed() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setTimeAllowed(100);
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertEquals(new Integer(100), solrQuery.getTimeAllowed());
  }
View Full Code Here

    Assert.assertEquals(new Integer(100), solrQuery.getTimeAllowed());
  }

  @Test
  public void testWithoutTimeAllowed() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNull(solrQuery.getTimeAllowed());
  }
View Full Code Here

    Assert.assertNull(solrQuery.getTimeAllowed());
  }

  @Test
  public void testWithLuceneDefType() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setDefType("lucene");
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNotNull(solrQuery.get("defType"));
  }
View Full Code Here

    Assert.assertNotNull(solrQuery.get("defType"));
  }

  @Test
  public void testWithEdismaxDefType() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setDefType("edismax");
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNotNull(solrQuery.get("defType"));
  }
View Full Code Here

    Assert.assertNotNull(solrQuery.get("defType"));
  }

  @Test
  public void testWithUndefindedDefType() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNull(solrQuery.get("defType"));
  }
View Full Code Here

    Assert.assertNull(solrQuery.get("defType"));
  }

  @Test
  public void testWithFooRequestHandler() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setRequestHandler("/foo");
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNotNull(solrQuery.get("qt"));
  }
View Full Code Here

    Assert.assertNotNull(solrQuery.get("qt"));
  }

  @Test
  public void testWithUndefinedRequestHandler() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNull(solrQuery.get("qt"));
  }
View Full Code Here

    Assert.assertNull(solrQuery.get("qt"));
  }

  @Test
  public void testWithJoinOperator() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setJoin(Join.from("inner_id").to("outer_id"));

    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertEquals("{!join from=inner_id to=outer_id}field_1:value_1", solrQuery.getQuery());
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.query.SimpleStringCriteria

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.