question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am trying to index the following twitter data in two different ways. The first option is a simple index option with the SolrNet library. When I do this the emojis don’t show up properly in solr.

Tweet: β€œaşı oluyorum πŸ˜€πŸ˜πŸ˜πŸ˜†πŸ˜ŸπŸ˜±πŸ˜ΌπŸ˜»πŸ™ŒπŸ˜€πŸ€²πŸ˜ΉπŸ§ πŸ€€ test yenisi”

image

           var solrDocument = new SolrDocument();

            solrDocument.Id = "440550419";
            solrDocument.Title = "aşı oluyorum πŸ˜€πŸ˜πŸ˜πŸ˜†πŸ˜ŸπŸ˜±πŸ˜ΌπŸ˜»πŸ™ŒπŸ˜€πŸ€²πŸ˜ΉπŸ§ πŸ€€ test yenisi";
            solrDocument.Body = "aşı oluyorum πŸ˜€πŸ˜πŸ˜πŸ˜†πŸ˜ŸπŸ˜±πŸ˜ΌπŸ˜»πŸ™ŒπŸ˜€πŸ€²πŸ˜ΉπŸ§ πŸ€€ test yenisi";
            solrDocument.WorkspaceId = 114;

            var url = $"http://localhost:8983/solr/2021";

            var connection = new SolrConnection(url);

            Startup.Init<SolrDocument>(connection);
            var solr = ServiceLocator.Current.GetInstance<ISolrOperations<SolrDocument>>();

            solr.Add(solrDocument);

however, I noticed that when I send the json with an httpclient, which is the other option, it looks fine in solr.

 var solrDocument = new SolrDocument();

            solrDocument.Id = "440550419";
            solrDocument.Title = "aşı oluyorum πŸ˜€πŸ˜πŸ˜πŸ˜†πŸ˜ŸπŸ˜±πŸ˜ΌπŸ˜»πŸ™ŒπŸ˜€πŸ€²πŸ˜ΉπŸ§ πŸ€€ test yenisi";
            solrDocument.Body = "aşı oluyorum πŸ˜€πŸ˜πŸ˜πŸ˜†πŸ˜ŸπŸ˜±πŸ˜ΌπŸ˜»πŸ™ŒπŸ˜€πŸ€²πŸ˜ΉπŸ§ πŸ€€ test yenisi";
            solrDocument.WorkspaceId = 114;

var list = new List<SolrDocument>();
            list.Add(solrDocument);

            var json = JsonConvert.SerializeObject(list);

            var _client = new HttpClient();
            var response = await _client.PostAsync("http://localhost:8983/solr/2021/update?commitWithin=1000", new StringContent(json, Encoding.UTF8, MediaTypeNames.Application.Json));

image

How can I fix this problem? So somehow the solrnet library can corrupt these emojis?

Solr version: 7.1.0 SolrNet version: 1.0.19

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
hoerupcommented, Oct 4, 2021

@mausch HakanKaraoglu might have a point I tried to update the AddAndQueryUnicode test and add his list of emojis - and it fails : https://github.com/hoerup/SolrNet/actions/runs/1304932806

1reaction
HakanKaraoglucommented, Oct 4, 2021

@mausch Can you test what I wrote? You will see that no emojis are displayed in Solr. This code may pass the test, but it’s okay if it doesn’t show emojis?

Read more comments on GitHub >

github_iconTop Results From Across the Web

πŸ“™ Emojipedia β€” πŸ˜ƒ Home of Emoji Meanings πŸ’πŸ‘ŒπŸŽπŸ˜
10 Years of Celebrity-Emoji Associations. In the 10 years since Emojipedia first began documenting global emoji use back in 2013, we've seen many...
Read more >
πŸ˜‹ Get Emoji β€” All Emojis to βœ‚οΈ Copy and πŸ“‹ Paste πŸ‘Œ
Emojis are supported on iOS, Android, macOS, Windows, Linux and ChromeOS. Copy and paste emojis for Twitter, Facebook, Slack, Instagram, Snapchat, Slack, GitHubΒ ......
Read more >
Full Emoji List, v15.0
This chart provides a list of the Unicode emoji characters and sequences, with images from different vendors, ... For further information, see Index...
Read more >
Support modern emoji
Emoji support in Compose; Prerequisites; Use AppCompat to support the latest emoji. If your app is using AppCompat but displays tofu (☐).
Read more >
Emoji support | Can I use... Support tables for HTML5 ...
Support for emoji is determined by the operating system's support rather than by browsers. As such support is not listed here. For more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found