Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Commit

Permalink
this commit closes issue #399.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdirocco committed Oct 4, 2019
1 parent a70d531 commit 45891e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private ISimilarityCalculator getSimilarityCalculator(String similarityMethod) t

@Override
public List<Artifact> getArtifactsByQuery(String projectQuery) {
TextCriteria criteria = TextCriteria.forDefaultLanguage().matchingPhrase(projectQuery);
TextCriteria criteria = TextCriteria.forDefaultLanguage().matchingAny(projectQuery);
org.springframework.data.mongodb.core.query.Query query = TextQuery.queryText(criteria).sortByScore()
.with(new PageRequest(0, 5));
List<Artifact> recipes = template.find(query, Artifact.class);
Expand All @@ -220,7 +220,7 @@ public List<Artifact> getArtifactsByQuery(String projectQuery) {

@Override
public List<Artifact> getArtifactsByQuery(String projectQuery, Pageable page) {
TextCriteria criteria = TextCriteria.forDefaultLanguage().matchingPhrase(projectQuery);
TextCriteria criteria = TextCriteria.forDefaultLanguage().matchingAny(projectQuery);
org.springframework.data.mongodb.core.query.Query query = TextQuery.queryText(criteria).sortByScore()
.with(page);
query.addCriteria(Criteria.where("type.name").ne("FOCUS"));
Expand Down

0 comments on commit 45891e3

Please sign in to comment.