Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
dff7ce60
Commit
dff7ce60
authored
Jul 12, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup NRediSearch for 1.x
parent
3cade0cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
10 deletions
+8
-10
NRediSearch.Test.csproj
NRediSearch.Test/NRediSearch.Test.csproj
+0
-1
RediSearchTestBase.cs
NRediSearch.Test/RediSearchTestBase.cs
+3
-2
AggregationResult.cs
NRediSearch/AggregationResult.cs
+2
-2
AssemblyInfo.cs
NRediSearch/AssemblyInfo.cs
+1
-1
Client.cs
NRediSearch/Client.cs
+2
-4
No files found.
NRediSearch.Test/NRediSearch.Test.csproj
View file @
dff7ce60
...
...
@@ -3,7 +3,6 @@
<OutputType>Library</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Redis\StackExchange.Redis.csproj" />
...
...
NRediSearch.Test/RediSearchTestBase.cs
View file @
dff7ce60
...
...
@@ -53,7 +53,8 @@ internal static ConnectionMultiplexer GetWithFT(ITestOutputHelper output)
var
conn
=
ConnectionMultiplexer
.
Connect
(
options
);
var
server
=
conn
.
GetServer
(
ep
);
var
arr
=
(
RedisResult
[])
server
.
Execute
(
"module"
,
"list"
);
var
db
=
conn
.
GetDatabase
();
var
arr
=
(
RedisResult
[])
db
.
Execute
(
"module"
,
"list"
);
bool
found
=
false
;
foreach
(
var
module
in
arr
)
{
...
...
@@ -75,7 +76,7 @@ internal static ConnectionMultiplexer GetWithFT(ITestOutputHelper output)
{
var
i
=
config
.
LastIndexOf
(
'/'
);
var
modulePath
=
config
.
Substring
(
0
,
i
+
1
)
+
"redisearch.so"
;
var
result
=
server
.
Execute
(
"module"
,
"load"
,
modulePath
);
var
result
=
db
.
Execute
(
"module"
,
"load"
,
modulePath
);
output
?.
WriteLine
((
string
)
result
);
}
}
...
...
NRediSearch/AggregationResult.cs
View file @
dff7ce60
...
...
@@ -22,8 +22,8 @@ internal AggregationResult(RedisResult result)
{
var
key
=
(
string
)
raw
[
j
++];
var
val
=
raw
[
j
++];
if
(
val
.
Type
!=
ResultType
.
MultiBulk
)
cur
.
Add
(
key
,
(
RedisValue
)
val
);
try
{
cur
.
Add
(
key
,
(
RedisValue
)
val
);
}
catch
{
}
}
_results
[
i
-
1
]
=
cur
;
}
...
...
NRediSearch/AssemblyInfo.cs
View file @
dff7ce60
// .NET port of https://github.com/RedisLabs/JRediSearch/
using
System.Runtime.CompilerServices
;
[
assembly
:
InternalsVisibleTo
(
"NRediSearch.Test
, PublicKey=00240000048000009400000006020000002400005253413100040000010001007791a689e9d8950b44a9a8886baad2ea180e7a8a854f158c9b98345ca5009cdd2362c84f368f1c3658c132b3c0f74e44ff16aeb2e5b353b6e0fe02f923a050470caeac2bde47a2238a9c7125ed7dab14f486a5a64558df96640933b9f2b6db188fc4a820f96dce963b662fa8864adbff38e5b4542343f162ecdc6dad16912fff
"
)]
[
assembly
:
InternalsVisibleTo
(
"NRediSearch.Test"
)]
NRediSearch/Client.cs
View file @
dff7ce60
...
...
@@ -441,10 +441,8 @@ public async Task<bool> AddHashAsync(RedisKey docId, double score, bool replace)
for
(
int
i
=
0
;
i
<
res
.
Length
;
i
+=
2
)
{
var
val
=
res
[
i
+
1
];
if
(
val
.
Type
!=
ResultType
.
MultiBulk
)
{
info
.
Add
((
string
)
res
[
i
],
(
RedisValue
)
val
);
}
try
{
info
.
Add
((
string
)
res
[
i
],
(
RedisValue
)
val
);
}
catch
{
}
}
return
info
;
...
...
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