Bug 1033308

Summary: @ProvidedId no longer required
Product: [JBoss] JBoss Data Grid 6 Reporter: Sanne Grinovero <sanne>
Component: DocumentationAssignee: Misha H. Ali <mhusnain>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.2.0CC: jdg-bugs, mgencur
Target Milestone: GA   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Build Name: 14318, Infinispan Query Guide-6.2-1 Build Date: 21-11-2013 08:29:28 Topic ID: 5006-489361 [Latest]
Last Closed: 2014-01-16 00:02:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sanne Grinovero 2013-11-21 20:32:44 UTC
Title: The Query Module Example

Describe the issue:
in "6.4.1. The Query Module Example"
remove the annotation @ProvidedId.

Also the formatting of the code examples is odd, would be nice to polish that.


Suggestions for improvement:

###############

@Indexed
public class Person implements Serializable {
   @Field(store = Store.YES)
   private String name;
   @Field
   private String description;
   @Field(store = Store.YES)
   private int age;
}

###############

SearchManager manager = Search.getSearchManager(cache);
QueryBuilder builder = sm.buildQueryBuilderForClass(Person.class).get();
Query luceneQuery = builder.keyword()
      .onField("name")
      .matching("FirstName")
      .createQuery();

###############

Comment 2 Misha H. Ali 2013-11-22 01:20:57 UTC
WIP

Comment 4 Martin Gencur 2013-11-25 15:54:22 UTC
Looks good except that one of the @Field annotations has a different color than the others. Is this expected?

Comment 5 Misha H. Ali 2013-11-25 23:48:35 UTC
That is automatic color markup. Red indicates that a tag is not closed or a line is not terminated correctly or such so I think as long as the code is correct, we can ignore the minor color discrepancy unless it is distracting for the user.

Comment 6 Misha H. Ali 2014-01-16 00:02:04 UTC
The fix for this bug is now generally released and available here:

https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.2/index.html