List of usage examples for org.springframework.data.solr.core.query SimpleQuery fromQuery
@Nullable public static final Query fromQuery(Query source)
From source file:org.springframework.data.solr.core.query.SimpleQueryTests.java
@Test public void testCloneWithDefaultOperator() { Query source = new SimpleQuery(new Criteria("field_1").is("value_1")); source.setDefaultOperator(Operator.OR); Query destination = SimpleQuery.fromQuery(source); Assert.assertEquals(source.getDefaultOperator(), destination.getDefaultOperator()); }
From source file:org.springframework.data.solr.core.query.SimpleQueryTests.java
@Test public void testCloneWithTimeAllowed() { Query source = new SimpleQuery(new Criteria("field_1").is("value_1")); source.setTimeAllowed(Integer.valueOf(10)); Query destination = SimpleQuery.fromQuery(source); Assert.assertEquals(source.getTimeAllowed(), destination.getTimeAllowed()); }
From source file:org.springframework.data.solr.core.query.SimpleQueryTests.java
@Test public void testCloneWithRequestHandler() { Query source = new SimpleQuery(new Criteria("field_1").is("value_1")); source.setRequestHandler("requestHandler"); Query destination = SimpleQuery.fromQuery(source); Assert.assertEquals(source.getRequestHandler(), destination.getRequestHandler()); }