Skip to content

Query for tag field search #3066

Answered by sazzad16
ludvig-sandstrom asked this question in Q&A
Discussion options

You must be logged in to vote

Hopefully following tests would help.

@Test
public void getTagField() {
Schema sc = new Schema()
.addTextField("title", 1.0)
.addTagField("category");
assertEquals("OK", client.ftCreate(index, IndexOptions.defaultOptions(), sc));
Map<String, Object> fields1 = new HashMap<>();
fields1.put("title", "hello world");
fields1.put("category", "red");
// assertTrue(client.addDocument("foo", fields1));
addDocument("foo", fields1);
Map<String, Object> fields2 = new HashMap<>();
fields2.put("title", "hello world");
fields2

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ludvig-sandstrom
Comment options

Answer selected by ludvig-sandstrom
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants