summaryrefslogtreecommitdiffstats
path: root/tests/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-03-12 22:57:13 -0400
committerJames Moger <james.moger@gitblit.com>2012-03-12 22:57:13 -0400
commit98b4edf75ffe0fd57caece27701250e42c901ff3 (patch)
treef91f1c8f9338019095706042992eabf5d705ed22 /tests/com
parent23b6eb52efa21a6ef386acade5c1c515012ceb39 (diff)
downloadgitblit-98b4edf75ffe0fd57caece27701250e42c901ff3.tar.gz
gitblit-98b4edf75ffe0fd57caece27701250e42c901ff3.zip
Revise indexed fields and improve Lucene page usability
Diffstat (limited to 'tests/com')
-rw-r--r--tests/com/gitblit/tests/LuceneUtilsTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/com/gitblit/tests/LuceneUtilsTest.java b/tests/com/gitblit/tests/LuceneUtilsTest.java
index e7754586..01858f50 100644
--- a/tests/com/gitblit/tests/LuceneUtilsTest.java
+++ b/tests/com/gitblit/tests/LuceneUtilsTest.java
@@ -41,9 +41,9 @@ public class LuceneUtilsTest {
String name = StringUtils.getRelativePath(GitBlitSuite.REPOSITORIES.getAbsolutePath(),
repository.getDirectory().getAbsolutePath());
LuceneUtils.reindex(name, repository);
- SearchResult result = LuceneUtils.search("type:blob AND id:bit.bit", 1, repository).get(0);
+ SearchResult result = LuceneUtils.search("type:blob AND path:bit.bit", 1, repository).get(0);
assertEquals("Mike Donaghy", result.author);
- result = LuceneUtils.search("type:blob AND id:clipper.prg", 1, repository).get(0);
+ result = LuceneUtils.search("type:blob AND path:clipper.prg", 1, repository).get(0);
assertEquals("tinogomes", result.author);
repository.close();
@@ -82,24 +82,24 @@ public class LuceneUtilsTest {
// blob test
results = LuceneUtils.search("type: blob AND \"import std.stdio\"", 10, repository);
assertEquals(1, results.size());
- assertEquals("d.D", results.get(0).id);
+ assertEquals("d.D", results.get(0).path);
// 1 occurrence on the gh-pages branch
repository = GitBlitSuite.getTheoreticalPhysicsRepository();
results = LuceneUtils.search("\"add the .nojekyll file\"", 10, repository);
assertEquals(1, results.size());
assertEquals("Ondrej Certik", results.get(0).author);
- assertEquals("2648c0c98f2101180715b4d432fc58d0e21a51d7", results.get(0).id);
+ assertEquals("2648c0c98f2101180715b4d432fc58d0e21a51d7", results.get(0).commitId);
assertEquals("refs/heads/gh-pages", results.get(0).branch);
results = LuceneUtils.search("type:blob AND \"src/intro.rst\"", 10, repository);
assertEquals(4, results.size());
// hash id tests
- results = LuceneUtils.search("id:57c4f26f157ece24b02f4f10f5f68db1d2ce7ff5", 10, repository);
+ results = LuceneUtils.search("commit:57c4f26f157ece24b02f4f10f5f68db1d2ce7ff5", 10, repository);
assertEquals(1, results.size());
- results = LuceneUtils.search("id:57c4f26f157*", 10, repository);
+ results = LuceneUtils.search("commit:57c4f26f157*", 10, repository);
assertEquals(1, results.size());
repository.close();