It's expected as the total number of rows fetched from database is 3 (1 from table Categories and 2 from CategorySynonyms).
The total number of document in solr is 1, as expected too:
Name:Category1,
Synonym: CategorySynonym1,CategorySynonym2
Perhaps you can try
<entity name="Categories" query="Select CID,Name,Synonym From Categories join CategorySynonyms on Id=CID">
<field column="Name" name="categoryNgram"/>
<field column="Synonym" name="synonym"/>
</entity>
Note: you may have to verify the SQL query to make sure it returns an Id field, and two rows as you would expected.