Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit af3d2d4

Browse files
author
sowerstl
committed
Support Keywords in search; (DOECODE-646)
1 parent 39135be commit af3d2d4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/java/gov/osti/search/SearchData.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class SearchData implements Serializable {
4343
private Date dateLatest = null;
4444
private String[] accessibility = null;
4545
private String[] programmingLanguages;
46+
private String keywords;
4647
private String[] licenses;
4748
private String[] researchOrganization = null;
4849
private String[] sponsoringOrganization = null;
@@ -230,6 +231,10 @@ public String toQ() {
230231
q.append("(").append(values.toString()).append(")");
231232
}
232233
}
234+
if (!StringUtils.isEmpty(getKeywords())) {
235+
if (q.length()>0) q.append(" ");
236+
q.append("keywords:(").append(escape(getKeywords())).append(")");
237+
}
233238
if (null!=getLicenses()) {
234239
StringBuilder values = new StringBuilder();
235240
for ( String license : getLicenses() ) {
@@ -371,6 +376,14 @@ public void setProgrammingLanguages(String[] programmingLanguages) {
371376
this.programmingLanguages = programmingLanguages;
372377
}
373378

379+
public void setKeywords(String keywords) {
380+
this.keywords = keywords;
381+
}
382+
383+
public String getKeywords() {
384+
return this.keywords;
385+
}
386+
374387
/**
375388
* @return the softwareType
376389
*/

0 commit comments

Comments
 (0)