mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
renamed package from com.mysema.query.search to com.mysema.query.lucene
This commit is contained in:
parent
ca00c68302
commit
2f010ef633
@ -18,7 +18,8 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -26,13 +27,6 @@
|
||||
<artifactId>querydsl-core</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-core</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>test</scope>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
# LuceneSerializer :
|
||||
* serialize Querydsl expressions (Path & Operation) into Lucene queries
|
||||
* overview of operations : com.mysema.query.types.operation.Ops
|
||||
* only supported path type : property
|
||||
* see EBoolean, ENumber, EComparable and Expr for operation usage
|
||||
|
||||
# LuceneQuery :
|
||||
* ?!?
|
||||
|
||||
# HibernateSearchQuery :
|
||||
* !?!
|
||||
@ -3,7 +3,7 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query.search;
|
||||
package com.mysema.query.lucene;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -3,7 +3,7 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query.search;
|
||||
package com.mysema.query.lucene;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@ -3,7 +3,7 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query.search;
|
||||
package com.mysema.query.lucene;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@ -28,8 +28,11 @@ import org.junit.Test;
|
||||
import com.mysema.query.QueryException;
|
||||
import com.mysema.query.QueryModifiers;
|
||||
import com.mysema.query.SearchResults;
|
||||
import com.mysema.query.lucene.LuceneQuery;
|
||||
import com.mysema.query.lucene.LuceneSerializer;
|
||||
import com.mysema.query.types.path.PEntity;
|
||||
import com.mysema.query.types.path.PString;
|
||||
import com.mysema.query.types.path.PathBuilder;
|
||||
import com.mysema.query.types.path.PathMetadataFactory;
|
||||
|
||||
/**
|
||||
* Tests for LuceneQuery
|
||||
@ -38,8 +41,23 @@ import com.mysema.query.types.path.PathBuilder;
|
||||
*
|
||||
*/
|
||||
public class LuceneQueryTest {
|
||||
|
||||
public class QDocument extends PEntity<Document>{
|
||||
|
||||
private static final long serialVersionUID = -4872833626508344081L;
|
||||
|
||||
public QDocument(String var) {
|
||||
super(Document.class, PathMetadataFactory.forVariable(var));
|
||||
}
|
||||
|
||||
public final PString year = createString("year");
|
||||
|
||||
public final PString title = createString("title");
|
||||
|
||||
}
|
||||
|
||||
private LuceneQuery query;
|
||||
private PathBuilder<Object> entityPath;
|
||||
// private PathBuilder<Object> entityPath;
|
||||
private PString title;
|
||||
private PString year;
|
||||
|
||||
@ -60,9 +78,13 @@ public class LuceneQueryTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
entityPath = new PathBuilder<Object>(Object.class, "obj");
|
||||
title = entityPath.getString("title");
|
||||
year = entityPath.getString("year");
|
||||
// entityPath = new PathBuilder<Object>(Object.class, "obj");
|
||||
// title = entityPath.getString("title");
|
||||
// year = entityPath.getString("year");
|
||||
|
||||
QDocument entityPath = new QDocument("doc");
|
||||
title = entityPath.title;
|
||||
year = entityPath.year;
|
||||
|
||||
idx = new RAMDirectory();
|
||||
writer = new IndexWriter(idx, new StandardAnalyzer(Version.LUCENE_CURRENT), true, MaxFieldLength.UNLIMITED);
|
||||
@ -3,7 +3,7 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query.search;
|
||||
package com.mysema.query.lucene;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
@ -26,6 +26,7 @@ import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.mysema.query.lucene.LuceneSerializer;
|
||||
import com.mysema.query.types.Expr;
|
||||
import com.mysema.query.types.path.PString;
|
||||
import com.mysema.query.types.path.PathBuilder;
|
||||
Loading…
Reference in New Issue
Block a user