[Persistence, JBoss/CMP, Hibernate, Database] - hibernate search, query return same record twice when use *
by serj_
please help me to understand why hibernate search query return as results same records twice. It is a bug or it is my mistake?
| @Entity
| @Indexed(index="UsersProfileData")
| public class UserData implements Serializable {
|
| private long id;
| private java.lang.String value;
|
| @Id
| @GeneratedValue(strategy = GenerationType.AUTO)
| @DocumentId
| public long getId() {
| return id;
| }
|
|
| public void setId(long id) {
| this.id = id;
| }
|
| @Field(name="summary", index=org.hibernate.search.annotations.Index.UN_TOKENIZED, store=Store.YES)
| public java.lang.String getValue() {
| return value;
| }
|
|
| public void setValue(java.lang.String comment) {
| this.value = comment;
| }
| }
|
adding data to table from session bean:
| String[] values = {"1","2","ab 1","ab 2"}
| for(int i=0;i<4;i++){
| UserData u = new UserData ();
| u1.setValue(values);
| em.persist(u);
| }
|
query for data, using *:
| FullTextEntityManager fullTextEntityManager =
| org.hibernate.search.jpa.Search.createFullTextEntityManager(em);
| QueryParser parser = new QueryParser("id", new KeywordAnalyzer() );
| org.apache.lucene.search.Query q = parser.parse( "summary:ab*" );
| org.hibernate.search.jpa.FullTextQuery hQuery = fullTextEntityManager.createFullTextQuery(q,UserData.class);
|
| List result = hQuery.getResultList();
| System.out.println("\n\t*** RESULTS: "+hQuery.getResultSize());
|
|
thanks for help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096524#4096524
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096524
18Â years, 9Â months
[JBoss Portal] - Re: Problems with SynchronizingLoginModule
by gspillman
There have been no responses to this message, and the time I have to complete the project is getting short.
Our goal was to synchronize only the identities, leaving JBoss Portal to manage it's own set of roles. I thought using SynchronizingLoginModule with synchronizeRoles set to false would allow us to do this.
However, the only difference the synchronizeRoles flag makes is in creating new roles. It still changes the state of existing roles based on what roles it finds in the previous login module, regardless of what the synchronizeRoles flag is set to. Since the JBPortal roles we set up are not in the NT Domain, it always turns our roles off when the user signs on. I have seen this behavior with both the NTLMLoginModule from JassLounge, and the UsersRolesLoginModule included in JBPortal.
Can no one duplicate this problem?
Is something in the problem or the procedure unclear?
Is there an alternative that achieves the above goal?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096522#4096522
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096522
18Â years, 9Â months
[JBoss Seam] - Seam with iText and RTF support
by brachie
Hi Seam-Community,
in our project we are working with the itext library and Seam.
We need to generate RTF documents. According to the Seam-documentation, there is basic support for outputting in RTF format.
Is there any reference where I can find the supported seam-tags for RTF? From what I have tried unfortunately there is no support for the <p:table>, so generating a table structure in RTF (we really need this!) is not possible out of the box with Seam. However, the itext library itself supports tables for RTF according to the itext-documentation.
Is there anybody who played around with rtf-based output using itext in Seam and can give me some hints how to use tables in RTF?
Thanks and regards,
Alexander
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096514#4096514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096514
18Â years, 9Â months