You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2019/04/18 07:37:06 UTC
[lucene-solr] branch master updated: LUCENE-2562: Don't randomly
enable term vectors on fields.
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 793635e LUCENE-2562: Don't randomly enable term vectors on fields.
793635e is described below
commit 793635eb0ed429b7e38f999fd9c4dc2d131530e0
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Thu Apr 18 09:27:09 2019 +0200
LUCENE-2562: Don't randomly enable term vectors on fields.
---
.../luke/models/documents/DocumentsTestBase.java | 30 +++++++++++-----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lucene/luke/src/test/org/apache/lucene/luke/models/documents/DocumentsTestBase.java b/lucene/luke/src/test/org/apache/lucene/luke/models/documents/DocumentsTestBase.java
index 58519fa..5c1cd0b 100644
--- a/lucene/luke/src/test/org/apache/lucene/luke/models/documents/DocumentsTestBase.java
+++ b/lucene/luke/src/test/org/apache/lucene/luke/models/documents/DocumentsTestBase.java
@@ -80,9 +80,9 @@ public abstract class DocumentsTestBase extends LuceneTestCase {
downloadsType.setStored(true);
Document doc1 = new Document();
- doc1.add(newField("title", "Pride and Prejudice", titleType));
- doc1.add(newField("author", "Jane Austen", authorType));
- doc1.add(newField("text",
+ doc1.add(new Field("title", "Pride and Prejudice", titleType));
+ doc1.add(new Field("author", "Jane Austen", authorType));
+ doc1.add(new Field("text",
"It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.",
textType));
doc1.add(new SortedSetDocValuesField("subject", new BytesRef("Fiction")));
@@ -91,18 +91,18 @@ public abstract class DocumentsTestBase extends LuceneTestCase {
writer.addDocument(doc1);
Document doc2 = new Document();
- doc2.add(newField("title", "Alice's Adventures in Wonderland", titleType));
- doc2.add(newField("author", "Lewis Carroll", authorType));
- doc2.add(newField("text", "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, ‘and what is the use of a book,’ thought Alice ‘without pictures or conversations?’",
+ doc2.add(new Field("title", "Alice's Adventures in Wonderland", titleType));
+ doc2.add(new Field("author", "Lewis Carroll", authorType));
+ doc2.add(new Field("text", "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, ‘and what is the use of a book,’ thought Alice ‘without pictures or conversations?’",
textType));
doc2.add(new SortedSetDocValuesField("subject", new BytesRef("Fantasy literature")));
doc2.add(new Field("downloads", packInt(18712), downloadsType));
writer.addDocument(doc2);
Document doc3 = new Document();
- doc3.add(newField("title", "Frankenstein; Or, The Modern Prometheus", titleType));
- doc3.add(newField("author", "Mary Wollstonecraft Shelley", authorType));
- doc3.add(newField("text", "You will rejoice to hear that no disaster has accompanied the commencement of an enterprise which you have regarded with such evil forebodings. I arrived here yesterday, and my first task is to assure my dear sister of my welfare and increasing confidence in the success of my undertaking.",
+ doc3.add(new Field("title", "Frankenstein; Or, The Modern Prometheus", titleType));
+ doc3.add(new Field("author", "Mary Wollstonecraft Shelley", authorType));
+ doc3.add(new Field("text", "You will rejoice to hear that no disaster has accompanied the commencement of an enterprise which you have regarded with such evil forebodings. I arrived here yesterday, and my first task is to assure my dear sister of my welfare and increasing confidence in the success of my undertaking.",
textType));
doc3.add(new SortedSetDocValuesField("subject", new BytesRef("Science fiction")));
doc3.add(new SortedSetDocValuesField("subject", new BytesRef("Horror tales")));
@@ -111,18 +111,18 @@ public abstract class DocumentsTestBase extends LuceneTestCase {
writer.addDocument(doc3);
Document doc4 = new Document();
- doc4.add(newField("title", "A Doll's House : a play", titleType));
- doc4.add(newField("author", "Henrik Ibsen", authorType));
- doc4.add(newField("text", "",
+ doc4.add(new Field("title", "A Doll's House : a play", titleType));
+ doc4.add(new Field("author", "Henrik Ibsen", authorType));
+ doc4.add(new Field("text", "",
textType));
doc4.add(new SortedSetDocValuesField("subject", new BytesRef("Drama")));
doc4.add(new Field("downloads", packInt(14629), downloadsType));
writer.addDocument(doc4);
Document doc5 = new Document();
- doc5.add(newField("title", "The Adventures of Sherlock Holmes", titleType));
- doc5.add(newField("author", "Arthur Conan Doyle", authorType));
- doc5.add(newField("text", "To Sherlock Holmes she is always the woman. I have seldom heard him mention her under any other name. In his eyes she eclipses and predominates the whole of her sex.",
+ doc5.add(new Field("title", "The Adventures of Sherlock Holmes", titleType));
+ doc5.add(new Field("author", "Arthur Conan Doyle", authorType));
+ doc5.add(new Field("text", "To Sherlock Holmes she is always the woman. I have seldom heard him mention her under any other name. In his eyes she eclipses and predominates the whole of her sex.",
textType));
doc5.add(new SortedSetDocValuesField("subject", new BytesRef("Fiction")));
doc5.add(new SortedSetDocValuesField("subject", new BytesRef("Detective and mystery stories")));