Issue Details (XML | Word | Printable)

Key: APF-267
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Matt Raible
Reporter: Matt Raible
Votes: 4
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
AppFuse

Add search feature to list screen generation

Created: 06/Feb/06 08:47 PM   Updated: 13/Nov/09 06:37 PM
Component/s: Tools - AppGen
Affects Version/s: 1.9
Fix Version/s: 2.1.0-M2

File Attachments: 1. Text File APF-267-20090105.patch (31 kB)




Matt Raible added a comment - 30/Oct/06 11:55 PM
2.1 is when we plan to add Compass integration.

Matt Raible made changes - 30/Oct/06 11:55 PM
Field Original Value New Value
Fix Version/s 2.1 [ 10031 ]
Fix Version/s 2.0-M1 [ 10005 ]
Franz Allan Valencia See added a comment - 03/Nov/07 10:41 AM
Good day

In addition to [1] and [2], [3] seems to be a pretty good appfuse + compass tutorial.

[1] and [2] uses appfuse 1.x while [3] uses appfuse 2.0.

Also, I've been playing around with appfuse-2.0 + jpa ( hibernate-entitymanager-3.3.1 ) + compass-1.2 but I've ran into a problem ( see [4] )

Cheers,
Franz

[1] http://www.nabble.com/search---integrate-compass-%28lucene%29-and-appfuse-p5022176s2369.html
[2] http://www.nabble.com/RE%3A-search---integrate-compass-%28lucene%29-and-appfuse-p5222253s2369.html
[3] http://www.nabble.com/Integrating-Appfuse-2.0-and-Compass-tf3877365s2369.html#a10986902
[4] http://forums.opensymphony.com/thread.jspa?messageID=225530

Franz Allan Valencia See added a comment - 25/Nov/07 09:57 PM
Good day,

Curious, what is the plan for this?

Will this be added on the Dao side? Manager side? Will this use Compass annotations or xml config?

Thanks,
Franz

Matt Raible added a comment - 25/Nov/07 10:04 PM
Franz - I would suggest asking these questions on the user mailing list. That way, we can discuss among all of AppFuse's users and see what they think the best approach is.

Franz Allan Valencia See added a comment - 25/Nov/07 11:27 PM
@Matt: Thanks for the quick reply and for the suggestion

@Everybody: I made a post in the Appfuse User mailing list about this ( see [1] ).

Thanks,
Franz

[1] http://www.nabble.com/How-should-Compass-be-integrated-with-Appfuse-2.x-tf4872943s2369.html

Matt Raible added a comment - 20/Nov/08 11:30 AM
Here's a tutorial on how to integrate Compass:

http://code.google.com/p/pagingappfuse/wiki/CompassSearching

Matt Raible added a comment - 04/Jan/09 06:51 PM
Patch from Shay Banon - founder of Compass. Here's the message included in the patch Shay sent:

----
I spent some time integrating Compass to the Appfuse DAO layer. I am attaching a patch that basically integrates with the Hibernate, JPA, and iBatis DAO implementations allowing to automatically mirror changes done through the DAO to the index, as well as performing full index operation (though Compass beans).
  
  I have chosen to index the User object (with Address as component), which seems like it make sense. You can check the changes I made to the pom files and the dao xml files. Also, I needed to upgrade iBatis to its latest version so Compass can work with it.

  I think that what is left to be done now is simply integrating search into the different view layers. I am no expert in it (I basically know Spring MVC, and in a superficial manner). I think it will be much faster for you to do that. I suggest creating a simple search action that uses the CompassSearchHelper.

   If you want, we can also enhance the service layer to include a search service, though I am not sure if it is needed for the first go.

   A quick breakdown of enabling search:

1. Added Searchable annotations to the User and Address.
2. Defined Compass bean, automatically scanning the model package for mapped searchable classes. It also automatically integrates with Spring transaction manager, and stores the index on the file system ([work dir]/target/test-index).
3. Defined CompassTemplate (similar in concept to HibernateTemplate).
4. Defined CompassSearchHelper. Really helps to perform search since it does pagination and so on.
5. Defined CompassGps, basically it allows for index operation allowing to completely reindex the data from the database. JPA and Hiberante also automatically mirror changes done through their API to the index. iBatis uses AOP.

   I don't know if you want to create search.properties file or not. But if you want, it can easily be created and have Compass read it within the definition of the Compass bean.

Cheers,
Shay
----

Thanks Shay!

Matt Raible made changes - 04/Jan/09 06:51 PM
Attachment APF-267-20090105.patch [ 10521 ]
Matt Raible made changes - 04/Jan/09 06:52 PM
Status Open [ 1 ] In Progress [ 3 ]
Matt Raible added a comment - 25/Mar/09 01:04 AM
Need to add the following to AppFuse Repo on oss.sonatype.org:

<repositories>
  <repository>
    <id>compass-project.org</id>
    <name>Compass</name>
    <url>http://repo.compass-project.org&lt;/url>
  </repository>
</repositories>

Also, need to add front-end functionality to talk to Compass. Would be great to have indexes available as a RESTful service that a web framework or Ajax could call.

3207 by  Matt Raible (18 files)
25/Mar/09 01:05 AM (10 months, 11 days ago)
APF-267: Added Compass to dao and service layers
appfuse: trunk/data/ibatis/pom.xml 3207 history download (+56 -0) diffs
appfuse: trunk/data/ibatis/src/test/resources/log4j.xml 3207 history download (+4 -0) diffs
appfuse: trunk/data/common/src/main/java/org/appfuse/model/Address.java 3207 history download (+8 -0) diffs
appfuse: trunk/data/hibernate/src/test/java/org/appfuse/dao/UserDaoTest.java 3207 history download (+46 -0) diffs
appfuse: trunk/data/jpa/src/test/java/org/appfuse/dao/UserDaoTest.java 3207 history download (+56 -0) diffs
appfuse: trunk/data/hibernate/src/test/resources/log4j.xml 3207 history download (+4 -0) diffs
appfuse: trunk/data/jpa/src/main/resources/applicationContext-dao.xml 3207 history download (+40 -0) diffs
appfuse: trunk/data/ibatis/src/test/java/org/appfuse/dao/UserDaoTest.java 3207 history download (+46 -0) diffs
appfuse: trunk/data/ibatis/src/main/java/org/appfuse/dao/ibatis/search 3207 history download new
appfuse: trunk/pom.xml 3207 history download (+9 -5) diffs
appfuse: trunk/data/jpa/src/test/resources/log4j.xml 3207 history download (+4 -0) diffs
appfuse: trunk/data/ibatis/src/main/resources/applicationContext-dao.xml 3207 history download (+63 -1) diffs
appfuse: trunk/data/common/src/main/java/org/appfuse/model/User.java 3207 history download (+13 -0) diffs
appfuse: trunk/data/common/pom.xml 3207 history download (+5 -0) diffs
appfuse: trunk/data/ibatis/src/main/java/org/appfuse/dao/ibatis/GenericDaoiBatis.java 3207 history download (+4 -0) diffs
appfuse: trunk/data/hibernate/src/main/resources/applicationContext-dao.xml 3207 history download (+38 -0) diffs
appfuse: trunk/data/ibatis/src/main/java/org/appfuse/dao/ibatis/search/CompassDeleteAdvice.java 3207 history download (+37) new
appfuse: trunk/data/ibatis/src/main/java/org/appfuse/dao/ibatis/search/CompassSaveAdvice.java 3207 history download (+38) new

Matt Raible made changes - 25/Mar/09 01:08 AM
Status In Progress [ 3 ] Open [ 1 ]
Matt Raible made changes - 13/Nov/09 06:37 PM
Fix Version/s 2.1.0-M1 [ 10031 ]
Fix Version/s 2.1.0-M2 [ 10210 ]