mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Better indexing for string properties to support path-based lookups
- Normal prefix-index has been shortened to 32 chars (from 64) - Added a fully indexed 'string_end' column of 16 characters - iBatis queries are optimized to pull short strings from the index - Long paths and NodeRefs are well-indexed using this approach git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15833 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@ public class PropertyStringValueEntity
|
||||
{
|
||||
private Long id;
|
||||
private String stringValue;
|
||||
private String stringEnd;
|
||||
|
||||
public PropertyStringValueEntity()
|
||||
{
|
||||
@@ -81,6 +82,23 @@ public class PropertyStringValueEntity
|
||||
{
|
||||
return new Pair<Long, String>(id, stringValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the string and string-end values
|
||||
*/
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.stringValue = value;
|
||||
int len = stringValue.length();
|
||||
if (len > 16)
|
||||
{
|
||||
stringEnd = stringValue.substring(len - 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
stringEnd = stringValue;
|
||||
}
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
@@ -101,4 +119,14 @@ public class PropertyStringValueEntity
|
||||
{
|
||||
this.stringValue = stringValue;
|
||||
}
|
||||
|
||||
public String getStringEnd()
|
||||
{
|
||||
return stringEnd;
|
||||
}
|
||||
|
||||
public void setStringEnd(String stringEnd)
|
||||
{
|
||||
this.stringEnd = stringEnd;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user