Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheScown committed Nov 13, 2015
2 parents 9570fcd + 0a7e667 commit 6400594
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.hp.autonomy.frontend.find</groupId>
<artifactId>find</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<packaging>war</packaging>

<properties>
Expand Down Expand Up @@ -332,32 +332,32 @@
<dependency>
<groupId>com.hp.autonomy.hod</groupId>
<artifactId>java-hod-client</artifactId>
<version>0.14.0-SNAPSHOT</version>
<version>0.14.0</version>
</dependency>
<dependency>
<groupId>com.hp.autonomy.hod</groupId>
<artifactId>hod-sso-spring-security</artifactId>
<version>0.4.0-SNAPSHOT</version>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>com.hp.autonomy.hod</groupId>
<artifactId>java-parametric-databases</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>com.hp.autonomy.frontend.view</groupId>
<artifactId>view-proxy-components</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>com.hp.autonomy.hod.redis</groupId>
<artifactId>redis-hod-token-repository</artifactId>
<version>0.4.0-SNAPSHOT</version>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>com.hp.autonomy.hod</groupId>
<artifactId>hod-spring-caching</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.2.0</version>
</dependency>

<dependency>
Expand All @@ -374,7 +374,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.1</version>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import com.hp.autonomy.hod.client.api.textindex.query.fields.RetrieveIndexFieldsServiceImpl;
import com.hp.autonomy.hod.client.api.textindex.query.parametric.GetParametricValuesService;
import com.hp.autonomy.hod.client.api.textindex.query.parametric.GetParametricValuesServiceImpl;
import com.hp.autonomy.hod.client.api.textindex.query.search.Documents;
import com.hp.autonomy.hod.client.api.textindex.query.search.Document;
import com.hp.autonomy.hod.client.api.textindex.query.search.FindRelatedConceptsService;
import com.hp.autonomy.hod.client.api.textindex.query.search.FindRelatedConceptsServiceImpl;
import com.hp.autonomy.hod.client.api.textindex.query.search.FindSimilarService;
Expand Down Expand Up @@ -187,7 +187,7 @@ public ResourcesService resourcesService() {
}

@Bean
public QueryTextIndexService<Documents> queryTextIndexService() {
public QueryTextIndexService<Document> queryTextIndexService() {
return QueryTextIndexServiceImpl.documentsService(hodServiceConfig());
}

Expand Down Expand Up @@ -222,7 +222,7 @@ public ParametricValuesService parametricValuesService() {
}

@Bean
public GetContentService<Documents> getContentService() {
public GetContentService<Document> getContentService() {
return GetContentServiceImpl.documentsService(hodServiceConfig());
}

Expand Down Expand Up @@ -251,7 +251,7 @@ public HodViewService hodViewService() {
}

@Bean
public FindSimilarService<Documents> findSimilarService() {
public FindSimilarService<Document> findSimilarService() {
return FindSimilarServiceImpl.documentsService(hodServiceConfig());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.hp.autonomy.frontend.find.beanconfiguration.HodCondition;
import com.hp.autonomy.hod.client.api.resource.ResourceIdentifier;
import com.hp.autonomy.hod.client.api.textindex.query.search.Document;
import com.hp.autonomy.hod.client.api.textindex.query.search.Documents;
import com.hp.autonomy.hod.client.api.textindex.query.search.Sort;
import com.hp.autonomy.hod.client.api.textindex.query.search.Summary;
Expand All @@ -33,7 +34,7 @@ public class DocumentsController {

@RequestMapping(value = "results", method = RequestMethod.GET)
@ResponseBody
public Documents query(
public Documents<Document> query(
@RequestParam("text") final String text,
@RequestParam("max_results") final int maxResults,
@RequestParam("summary") final Summary summary,
Expand All @@ -48,7 +49,7 @@ public Documents query(

@RequestMapping(value="promotions", method = RequestMethod.GET)
@ResponseBody
public Documents queryForPromotions(
public Documents<Document> queryForPromotions(
@RequestParam("text") final String text,
@RequestParam("max_results") final int maxResults,
@RequestParam("summary") final Summary summary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.hp.autonomy.frontend.find.search;

import com.hp.autonomy.hod.client.api.resource.ResourceIdentifier;
import com.hp.autonomy.hod.client.api.textindex.query.search.Document;
import com.hp.autonomy.hod.client.api.textindex.query.search.Documents;
import com.hp.autonomy.hod.client.api.textindex.query.search.Sort;
import com.hp.autonomy.hod.client.api.textindex.query.search.Summary;
Expand All @@ -16,8 +17,8 @@

public interface DocumentsService {

Documents queryTextIndex(String text, int maxResults, Summary summary, List<ResourceIdentifier> indexes, String fieldText, Sort sort, DateTime minDate, DateTime maxDate) throws HodErrorException;
Documents<Document> queryTextIndex(String text, int maxResults, Summary summary, List<ResourceIdentifier> indexes, String fieldText, Sort sort, DateTime minDate, DateTime maxDate) throws HodErrorException;

Documents queryTextIndexForPromotions(String text, int maxResults, Summary summary, List<ResourceIdentifier> indexes, String fieldText, Sort sort, DateTime minDate, DateTime maxDate) throws HodErrorException;
Documents<Document> queryTextIndexForPromotions(String text, int maxResults, Summary summary, List<ResourceIdentifier> indexes, String fieldText, Sort sort, DateTime minDate, DateTime maxDate) throws HodErrorException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.hp.autonomy.frontend.find.configuration.HodFindConfig;
import com.hp.autonomy.frontend.find.web.CacheNames;
import com.hp.autonomy.hod.client.api.resource.ResourceIdentifier;
import com.hp.autonomy.hod.client.api.textindex.query.search.Document;
import com.hp.autonomy.hod.client.api.textindex.query.search.Documents;
import com.hp.autonomy.hod.client.api.textindex.query.search.Print;
import com.hp.autonomy.hod.client.api.textindex.query.search.QueryRequestBuilder;
Expand All @@ -35,21 +36,21 @@ public class HodDocumentsService implements DocumentsService {
private ConfigService<HodFindConfig> configService;

@Autowired
private QueryTextIndexService<Documents> queryTextIndexService;
private QueryTextIndexService<Document> queryTextIndexService;

@Override
@Cacheable(CacheNames.DOCUMENTS)
public Documents queryTextIndex(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText, final Sort sort, final DateTime minDate, final DateTime maxDate) throws HodErrorException {
public Documents<Document> queryTextIndex(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText, final Sort sort, final DateTime minDate, final DateTime maxDate) throws HodErrorException {
return queryTextIndex(text, maxResults, summary, indexes, fieldText, sort, minDate, maxDate, false);
}

@Override
@Cacheable(CacheNames.PROMOTED_DOCUMENTS)
public Documents queryTextIndexForPromotions(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText , final Sort sort, final DateTime minDate, final DateTime maxDate) throws HodErrorException {
public Documents<Document> queryTextIndexForPromotions(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText , final Sort sort, final DateTime minDate, final DateTime maxDate) throws HodErrorException {
return queryTextIndex(text, maxResults, summary, indexes, fieldText, sort, minDate, maxDate, true);
}

private Documents queryTextIndex(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText, final Sort sort, final DateTime minDate, final DateTime maxDate, final boolean doPromotions) throws HodErrorException {
private Documents<Document> queryTextIndex(final String text, final int maxResults, final Summary summary, final List<ResourceIdentifier> indexes, final String fieldText, final Sort sort, final DateTime minDate, final DateTime maxDate, final boolean doPromotions) throws HodErrorException {
final String domain = ((HodAuthentication) SecurityContextHolder.getContext().getAuthentication()).getPrincipal().getApplication().getDomain();
final String profileName = configService.getConfig().getQueryManipulation().getProfile();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class HodSimilarDocumentsService implements SimilarDocumentsService {
private static final int MAX_RESULTS = 3;

@Autowired
private FindSimilarService<Documents> findSimilarService;
private FindSimilarService<Document> findSimilarService;

@Override
@Cacheable(CacheNames.SIMILAR_DOCUMENTS)
Expand All @@ -40,7 +40,7 @@ public List<Document> findSimilar(final Set<ResourceIdentifier> indexes, final S
.setAbsoluteMaxResults(MAX_RESULTS)
.setSummary(Summary.concept);

final Documents result = findSimilarService.findSimilarDocumentsToIndexReference(reference, requestBuilder);
final Documents<Document> result = findSimilarService.findSimilarDocumentsToIndexReference(reference, requestBuilder);
return result.getDocuments();
}
}

0 comments on commit 6400594

Please sign in to comment.