Index the abstract
This commit is contained in:
parent
6a3087cabd
commit
a4d505ce06
|
@ -2,3 +2,4 @@ data
|
|||
data-test
|
||||
target
|
||||
output
|
||||
.index
|
||||
|
|
|
@ -85,6 +85,11 @@ public class Indexer {
|
|||
authorName = authorName.replaceAll("\\p{P}", "");
|
||||
doc.add(new TextField("authors", authorName, Field.Store.YES));
|
||||
}
|
||||
StringBuilder fullAbstract = new StringBuilder();
|
||||
for (Abstract abstract_ : paper.abstract_) {
|
||||
fullAbstract.append(abstract_.text);
|
||||
}
|
||||
doc.add(new TextField("abstract", fullAbstract.toString(), Field.Store.NO));
|
||||
index.addDocument(doc);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.RI.P2;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
class Affiliation {
|
||||
String laboratory;
|
||||
String institution;
|
||||
|
@ -40,6 +42,7 @@ class Body_Text {
|
|||
public class Paper {
|
||||
String paper_id;
|
||||
Metadata metadata;
|
||||
List<Abstract> _abstract;
|
||||
@SerializedName("abstract")
|
||||
List<Abstract> abstract_;
|
||||
List<Body_Text> body_text;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue