Gravatar for baxterwlane@outlook.com

Question by Baxter_Lane, Mar 12, 2019 1:18 PM

Document ID (url) truncated when I add a document to my Push Source

I am using the Push Source API to build my own index from a Restful API behind a firewall.

Having trouble, for some reason when I push the document with an ID of "http://[site]/product/[product]?color=[color]&shape=[shape] the system is dropping the &shape portion of the ID, which means not all of my documents are being indexed and the URL is wrong

Any help would be appreciated!

I am on Coveo Cloud V2.

Thanks

Baxter Lane

Sitecore Engineer

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Mar 12, 2019 6:20 PM

Could it be possible that "color" contains a value that is invalid for a document ID?

According to the documentation, you must URL-encode you URI, are you already doing that?

Can you share a real query string part of your URI? :)

Gravatar for baxterwlane@outlook.com

Comment by Baxter_Lane, Mar 13, 2019 12:30 PM

no, we make sure it is compatible

it always happens too, not just sometimes, good thought though

Here is an example of the first 42 urls

There are 42 products http://daltile.sc/product/Acacia-Valley?color=Brown&shape=Plank http://daltile.sc/product/Acacia-Valley?color=Drk-Brown&shape=Plank http://daltile.sc/product/Acacia-Valley?color=Ridge&shape=Plank http://daltile.sc/product/Acacia-Valley?color=White&shape=Plank http://daltile.sc/product/Affinity?color=Cream&shape=Rectangle http://daltile.sc/product/Affinity?color=Gray&shape=Rectangle http://daltile.sc/product/Affinity?color=Gray&shape=Square http://daltile.sc/product/Affinity?color=Ivory&shape=Rectangle http://daltile.sc/product/Affinity?color=Ivory&shape=Square http://daltile.sc/product/Alessi?color=Black&shape=Geometric http://daltile.sc/product/ALESSI?color=Acacia-Beige&shape=Plank http://daltile.sc/product/Ambassador?color=Global-Grey&shape=Decorative http://daltile.sc/product/Ambassador?color=Global-Grey&shape=Geometric http://daltile.sc/product/Ambassador?color=Global-Grey&shape=Rectangle http://daltile.sc/product/Ambassador?color=Global-Grey&shape=Square http://daltile.sc/product/Ambassador?color=Jet-Setter-Dusk&shape=Decorative http://daltile.sc/product/Ambassador?color=Jet-Setter-Dusk&shape=Geometric http://daltile.sc/product/Ambassador?color=Jet-Setter-Dusk&shape=Rectangle http://daltile.sc/product/Ambassador?color=Jet-Setter-Dusk&shape=Square http://daltile.sc/product/Ambassador?color=Voyager-Black&shape=Decorative http://daltile.sc/product/Ambassador?color=Voyager-Black&shape=Geometric http://daltile.sc/product/Ambassador?color=Voyager-Black&shape=Rectangle http://daltile.sc/product/Ambassador?color=Voyager-Black&shape=Square http://daltile.sc/product/Ambassador?color=Wanderlust-Wht&shape=Decorative http://daltile.sc/product/Ambassador?color=Wanderlust-Wht&shape=Geometric http://daltile.sc/product/Ambassador?color=Wanderlust-Wht&shape=Rectangle http://daltile.sc/product/Ambassador?color=Wanderlust-Wht&shape=Square http://daltile.sc/product/AMBASSADOR---STONE-ATTACHE?color=Taupe&shape=Geometric http://daltile.sc/product/Anchorage?color=Beige&shape=Rectangle http://daltile.sc/product/Anchorage?color=Beige&shape=Square http://daltile.sc/product/Anchorage?color=Black&shape=Rectangle http://daltile.sc/product/Anchorage?color=Black&shape=Square http://daltile.sc/product/Anchorage?color=Brown&shape=Rectangle http://daltile.sc/product/Anchorage?color=Brown&shape=Square http://daltile.sc/product/Anchorage?color=Dark-Grey&shape=Rectangle http://daltile.sc/product/Anchorage?color=Dark-Grey&shape=Square http://daltile.sc/product/Anchorage?color=Light-Grey&shape=Rectangle http://daltile.sc/product/Anchorage?color=Light-Grey&shape=Square http://daltile.sc/product/Anchorage?color=Medium-Grey&shape=Rectangle http://daltile.sc/product/Anchorage?color=Medium-Grey&shape=Square http://daltile.sc/product/Anchorage?color=White&shape=Rectangle http://daltile.sc/product/Anchorage?color=White&shape=Square

1 Reply
Gravatar for baxterwlane@outlook.com

Answer by Baxter_Lane, Mar 12, 2019 11:01 PM

you were right, pretty easy to fix

return AddOrderingIDToUrl($"documents?documentId={ HttpUtility.UrlEncode(documentID)}");

thanks man!

Ask a question