Skip to content

Add More Coverage #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jan 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chagne payload to string
shacharPash committed Jan 1, 2023
commit 51ad59c79e26f3c480a46ec708d4036200fc4eef
11 changes: 7 additions & 4 deletions src/NRedisStack/Search/FT.CREATE/FTCreateParams.cs
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ public class FTCreateParams
private string languageField;
private double score;
private string scoreField;
private byte[] payloadField;
private string payloadField;
private bool maxTextFields;
private bool noOffsets;
private long temporary;
@@ -118,12 +118,15 @@ public FTCreateParams ScoreField(string scoreField)
/// Document attribute that you use as a binary safe payload string to the document that can be
/// evaluated at query time by a custom scoring function or retrieved to the client.
/// </summary>
public FTCreateParams PayloadField(byte[] payloadAttribute)
public FTCreateParams PayloadField(string payloadAttribute)
{
Array.Copy(this.payloadField, payloadAttribute, payloadAttribute.Length);
//TODO: check if this is correct
// Array.Copy(this.payloadField, payloadAttribute, payloadAttribute.Length);
this.payloadField = payloadAttribute;
return this;
}


/// <summary>
/// Forces RediSearch to encode indexes as if there were more than 32 text attributes.
/// </summary>
@@ -192,7 +195,7 @@ public FTCreateParams NoFreqs()
/// <summary>
/// Sets the index with a custom stopword list, to be ignored during indexing and search time.
/// </summary>
public FTCreateParams topwords(params string[] stopwords)
public FTCreateParams Stopwords(params string[] stopwords)
{
this.stopwords = stopwords.ToList();
return this;