Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Searchitect
searchitect
Commits
9912ea86
Commit
9912ea86
authored
Jul 18, 2019
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename db column to prevent hibenration error (array is reserved word)
parent
f1a06574
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
searchitect-backend-dynrh2lev/src/main/java/searchitect/model/IndexImpl.java
...-dynrh2lev/src/main/java/searchitect/model/IndexImpl.java
+8
-8
searchitect-backend-dynrh2lev/src/test/java/searchitect/model/IndexImplTest.java
...rh2lev/src/test/java/searchitect/model/IndexImplTest.java
+1
-1
No files found.
searchitect-backend-dynrh2lev/src/main/java/searchitect/model/IndexImpl.java
View file @
9912ea86
...
...
@@ -52,8 +52,8 @@ public class IndexImpl {
private
HashMap
<
String
,
byte
[]>
updateDictionary
;
@Lob
@Column
(
name
=
"array"
,
columnDefinition
=
"BLOB"
)
byte
[][]
array
;
@Column
(
name
=
"
s
array"
,
columnDefinition
=
"BLOB"
)
byte
[][]
s
array
;
protected
IndexImpl
()
{
// jpa only
}
...
...
@@ -86,14 +86,14 @@ public class IndexImpl {
* @return the array
*/
public
byte
[][]
getArray
()
{
return
array
;
return
s
array
;
}
/**
* @param array the array to set
*/
public
void
setArray
(
byte
[][]
array
)
{
this
.
array
=
array
;
public
void
setArray
(
byte
[][]
s
array
)
{
this
.
s
array
=
s
array
;
}
/**
...
...
@@ -109,7 +109,7 @@ public class IndexImpl {
throws
JsonParseException
,
JsonMappingException
,
JsonProcessingException
,
IOException
{
// test if index is valid multimap
this
.
dictionary
=
uploadIndex
.
getDictionary
();
this
.
array
=
uploadIndex
.
getArray
();
this
.
s
array
=
uploadIndex
.
getArray
();
this
.
updateDictionary
=
new
HashMap
<
String
,
byte
[]>();
this
.
repositoryName
=
UUID
.
randomUUID
().
toString
();
}
...
...
@@ -151,10 +151,10 @@ public class IndexImpl {
NoSuchProviderException
,
NoSuchPaddingException
,
IOException
,
NullPointerException
{
List
<
String
>
resultList
;
if
(
updateDictionary
.
size
()==
0
){
resultList
=
DynRH2LevModifiedMap
.
query
(
token
.
getSearchToken
(),
dictionary
,
array
,
updateDictionary
);
resultList
=
DynRH2LevModifiedMap
.
query
(
token
.
getSearchToken
(),
dictionary
,
s
array
,
updateDictionary
);
}
else
{
resultList
=
DynRH2LevModifiedMap
.
queryFS
(
token
.
getSearchToken
(),
dictionary
,
array
,
updateDictionary
);
resultList
=
DynRH2LevModifiedMap
.
queryFS
(
token
.
getSearchToken
(),
dictionary
,
s
array
,
updateDictionary
);
}
return
new
SearchResult
(
resultList
);
...
...
searchitect-backend-dynrh2lev/src/test/java/searchitect/model/IndexImplTest.java
View file @
9912ea86
...
...
@@ -54,7 +54,7 @@ public static void cleanup() throws IOException{
@Test
public
void
IndexImplConstructorSuccessTest
()
throws
Exception
{
IndexImpl
index
=
new
IndexImpl
(
new
UploadIndexdynrh2levMap
(
TestUtil
.
dic
,
TestUtil
.
getArray
()));
assertArrayEquals
(
index
.
array
[
0
],
"test1"
.
getBytes
());
assertArrayEquals
(
index
.
s
array
[
0
],
"test1"
.
getBytes
());
assertFalse
(
index
.
getRepositoryName
().
isEmpty
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment