maven dependency issue for FTS

Avatar

Avatar
Validate 25
Level 3
asn_177
Level 3

Likes

4 likes

Total Posts

88 posts

Correct reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 25
Level 3
asn_177
Level 3

Likes

4 likes

Total Posts

88 posts

Correct reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 3
Boost 1
View profile
asn_177
Level 3

15-10-2015

I want to implement Free Text search using remote Solr server with AEM 6.

I have done the configurations as advised here.

Now I want to demonstrate search using this remote solr server.I have created  a search component for this.I have attached the code, pls let me know if this is correct way of connecting to remote solr server.

i am including 

 <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr-core</artifactId>
            <version>4.3.0</version>
            <scope>compile</scope>
        </dependency> 

in my main parent pom(main pom of maven multimodule project) and 

 <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr-core</artifactId>
  </dependency> 

and 

 <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>searchApp-bundle</Bundle-SymbolicName>
                             <Embed-Transitive>true</Embed-Transitive>
                             <Embed-Dependency>*;scope=runtime|compile</Embed-Dependency>
                 </instructions>
                </configuration>
            </plugin>

The project compiles fine locally but when I upload it as an osgi bundle the transitive dependencies cause a lot of unresolved dependencies.I wonder I why the transitive dependencies are not icluded in the resulting bundle even after specifying   <Embed-Transitive>true</Embed-Transitive>.

Any help or sample code snippet will  help a lot.

View Entire Topic

Avatar

Avatar
Boost 5
Employee
kalyanar
Employee

Likes

5 likes

Total Posts

182 posts

Correct reply

78 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 50
Affirm 5
View profile

Avatar
Boost 5
Employee
kalyanar
Employee

Likes

5 likes

Total Posts

182 posts

Correct reply

78 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 50
Affirm 5
View profile
kalyanar
Employee

15-10-2015

AEM already integrates with solr. Please have a look at http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html . So solrj is already present as a bundle in AEM. In any case, i suggest you leverage the OOB integration. The OOB integration also respects the ACLs when it fetches from the indexes. You have to handle that if you query directly.