Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. @Column
  2. @Field (index = Index.YES, store = Store.YES)
  3. private String title;
  4.  
  5. @Id
  6. @Column
  7. @DocumentId
  8. @Field (store = Store.YES)
  9. private String guid;
  10.  
  11. Session sess = sessionFactory.openSession();
  12. FullTextSession fts = org.hibernate.search.Search.getFullTextSession(sess);
  13. //returns matching Articles from database, how would I retrieve only the index records?
  14. Query query = fts.createFullTextQuery(luceneQuery, Article.class);
  15.  
  16. query.setProjection( "field1", "field2", "field3" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement